This commit is contained in:
Dominik Liebler
2013-09-13 14:19:55 +02:00
parent 8452c63b7e
commit 8b82ed198d
47 changed files with 93 additions and 218 deletions

View File

@@ -1,9 +1,5 @@
<?php
/*
* DesignPatternPHP
*/
namespace DesignPatterns\Tests\FactoryMethod;
use DesignPatterns\FactoryMethod\FactoryMethod;
@@ -38,7 +34,7 @@ class FactoryMethodTest extends \PHPUnit_Framework_TestCase
// about the factory, all we know is it can produce vehicle
foreach ($this->type as $oneType) {
$vehicle = $shop->create($oneType);
$this->assertInstanceOf('DesignPatterns\FactoryMethod\Vehicle', $vehicle);
$this->assertInstanceOf('DesignPatterns\FactoryMethod\VehicleInterface', $vehicle);
}
}
@@ -51,5 +47,4 @@ class FactoryMethodTest extends \PHPUnit_Framework_TestCase
{
$shop->create('spaceship');
}
}
}