mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 20:20:15 +02:00
add psalm and travis check
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace DesignPatterns\Creational\StaticFactory\Tests;
|
||||
|
||||
use DesignPatterns\Creational\StaticFactory\FormatNumber;
|
||||
use DesignPatterns\Creational\StaticFactory\FormatString;
|
||||
use DesignPatterns\Creational\StaticFactory\StaticFactory;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
@@ -9,18 +11,12 @@ class StaticFactoryTest extends TestCase
|
||||
{
|
||||
public function testCanCreateNumberFormatter()
|
||||
{
|
||||
$this->assertInstanceOf(
|
||||
'DesignPatterns\Creational\StaticFactory\FormatNumber',
|
||||
StaticFactory::factory('number')
|
||||
);
|
||||
$this->assertInstanceOf(FormatNumber::class, StaticFactory::factory('number'));
|
||||
}
|
||||
|
||||
public function testCanCreateStringFormatter()
|
||||
{
|
||||
$this->assertInstanceOf(
|
||||
'DesignPatterns\Creational\StaticFactory\FormatString',
|
||||
StaticFactory::factory('string')
|
||||
);
|
||||
$this->assertInstanceOf(FormatString::class, StaticFactory::factory('string'));
|
||||
}
|
||||
|
||||
public function testException()
|
||||
|
Reference in New Issue
Block a user