Skip to content

Commit

Permalink
Refactoring tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Dec 12, 2017
1 parent acea8ed commit a84fb0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Tests/Helper/HelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testGetSetCharset()
{
$helper = new ProjectTemplateHelper();
$helper->setCharset('ISO-8859-1');
$this->assertTrue('ISO-8859-1' === $helper->getCharset(), '->setCharset() sets the charset set related to this helper');
$this->assertSame('ISO-8859-1', $helper->getCharset(), '->setCharset() sets the charset set related to this helper');
}
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Loader/CacheLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CacheLoaderTest extends TestCase
public function testConstructor()
{
$loader = new ProjectTemplateLoader($varLoader = new ProjectTemplateLoaderVar(), sys_get_temp_dir());
$this->assertTrue($loader->getLoader() === $varLoader, '__construct() takes a template loader as its first argument');
$this->assertSame($loader->getLoader(), $varLoader, '__construct() takes a template loader as its first argument');
$this->assertEquals(sys_get_temp_dir(), $loader->getDir(), '__construct() takes a directory where to store the cache as its second argument');
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/PhpEngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function testGetSetHas()
$engine[$foo] = 'bar';
$this->assertEquals($foo, $engine->get('bar'), '->set() takes an alias as a second argument');

$this->assertTrue(isset($engine['bar']));
$this->assertArrayHasKey('bar', $engine);

try {
$engine->get('foobar');
Expand All @@ -75,7 +75,7 @@ public function testGetSetHas()
$this->assertEquals('The helper "foobar" is not defined.', $e->getMessage(), '->get() throws an InvalidArgumentException if the helper is not defined');
}

$this->assertTrue(isset($engine['bar']));
$this->assertArrayHasKey('bar', $engine);
$this->assertTrue($engine->has('foo'), '->has() returns true if the helper exists');
$this->assertFalse($engine->has('foobar'), '->has() returns false if the helper does not exist');
}
Expand Down

0 comments on commit a84fb0f

Please sign in to comment.