Skip to content

Commit

Permalink
Merge pull request #59 from open-source-contributions/test_enhancement
Browse files Browse the repository at this point in the history
Improvements about type assertions and namespaces
  • Loading branch information
dereuromark committed Aug 21, 2020
2 parents 54ced46 + 01adacf commit 5251483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/TestCase/Twig/Extension/AbstractExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function tearDown(): void
public function testGetTokenParsers()
{
$tokenParsers = $this->extension->getTokenParsers();
$this->assertTrue(is_array($tokenParsers));
$this->assertIsArray($tokenParsers);
foreach ($tokenParsers as $tokenParser) {
$this->assertTrue($tokenParser instanceof TokenParserInterface);
}
Expand All @@ -51,7 +51,7 @@ public function testGetTokenParsers()
public function testGetNodeVisitors()
{
$nodeVisitors = $this->extension->getNodeVisitors();
$this->assertTrue(is_array($nodeVisitors));
$this->assertIsArray($nodeVisitors);
foreach ($nodeVisitors as $nodeVisitor) {
$this->assertInstanceOf('Twig_NodeVisitorInterface', $nodeVisitor);
}
Expand All @@ -60,7 +60,7 @@ public function testGetNodeVisitors()
public function testGetFilters()
{
$filters = $this->extension->getFilters();
$this->assertTrue(is_array($filters));
$this->assertIsArray($filters);
foreach ($filters as $filter) {
$this->assertInstanceOf(TwigFilter::class, $filter);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/View/TwigViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @license https://opensource.org/licenses/mit-license.php MIT License
*/

namespace Cake\TwigView\Test\TestCase;
namespace Cake\TwigView\Test\TestCase\View;

use Cake\TestSuite\TestCase;
use TestApp\View\AppView;
Expand Down

0 comments on commit 5251483

Please sign in to comment.