Support the ongoing development of Laravel.io →
Configuration Testing

I'm reading through Jeffery Way's book "Laravel Testing Decoded" and I've run into a snag. I don't quite understand what's going on and am quite frustrated, really.

I have a class in /tests/Models ...

<?php

use Way\Tests\Assert;
use Way\Tests\Should;
use Way\Tests\Factory;
use Way\Tests\ModelHelpers;

class UserTest extends TestCase {

	public function testFactory()
	{
		$user = Factory::make('User');		
	}

}

When I run phpunit it reports an error ...

PHP Fatal error: Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found in /Library/WebServer/myapp/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php on line 59

Fatal error: Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found in /Library/WebServer/myapp/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php on line 59

I don't think I use Doctrine or DBAL. I do use MySQL but I'm not even trying to touch database here. I'm just trying to create a User model.

My composer.json ...

{
	"require": {
		"laravel/framework": "4.2.*",
		"michelf/php-markdown": "1.3.*@dev"
	},
	"require-dev": {
		"phpunit/phpunit": "3.7.*",
		"mockery/mockery": "0.9.*@dev",
		"way/phpunit-wrappers": "dev-master",
		"way/laravel-test-helpers" : "dev-master"
	},
	"autoload": {
		"classmap": [
			"app/commands",
			"app/MyApp/Filters",
			"app/MyApp/Controllers",
			"app/MyApp/Models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		],
        "psr-4": {
            "MyApp\\": "app/MyApp"
        }
	},
	"scripts": {
		"pre-update-cmd": [
			"php artisan clear-compiled"
		],
		"post-install-cmd": [
			"php artisan optimize"
		],
		"post-update-cmd": [
			"php artisan optimize"
		]
	},
	"config": {
		"preferred-install": "dist"
	},
	"minimum-stability": "stable"
}

What is going on here? Why am I getting this error?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

MacWorks macworks Joined 6 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.