Skip to content

Commit

Permalink
Fix up tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Dec 31, 2018
1 parent b5b51ee commit 3418d09
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions tests/TestCase/Dto/DtoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ public function testIgnoreMissing() {
'color' => 'blue',
'distanceTravelled' => 66,
];
$dto = new CarDto($array, CarDto::TYPE_DEFAULT, true);
$dto = new CarDto($array, true, CarDto::TYPE_DEFAULT);
$this->assertInstanceOf(CarDto::class, $dto);

$this->expectException(InvalidArgumentException::class);

$dto = new CarDto($array);
$this->assertInstanceOf(CarDto::class, $dto);
new CarDto($array);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Engine/NeonEngineTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CakeDto\Test\TestCase\Dto;
namespace CakeDto\Test\TestCase\Engine;

use CakeDto\Engine\NeonEngine;
use Cake\TestSuite\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Engine/XmlEngineTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CakeDto\Test\TestCase\Dto;
namespace CakeDto\Test\TestCase\Engine;

use CakeDto\Engine\XmlEngine;
use Cake\TestSuite\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Engine/XmlValidatorTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CakeDto\Test\TestCase\Dto;
namespace CakeDto\Test\TestCase\Engine;

use CakeDto\Engine\XmlValidator;
use Cake\TestSuite\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Engine/YamlEngineTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CakeDto\Test\TestCase\Dto;
namespace CakeDto\Test\TestCase\Engine;

use CakeDto\Engine\YamlEngine;
use Cake\TestSuite\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Generator/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function setUp() {
public function tearDown() {
parent::tearDown();

unset($this->builder);
unset($this->generator);

Configure::write('CakeDto.scalarTypeHints', false);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/DtoShellTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class DtoShellTest extends TestCase {

/**
* @var \CakeDto\Shell\DtoShell
* @var \CakeDto\Shell\DtoShell|\PHPUnit\Framework\MockObject\MockObject
*/
protected $shell;

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/View/RendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function setUp() {
public function tearDown() {
parent::tearDown();

unset($this->builder);
unset($this->renderer);

Configure::delete('CakeDto.strictTypes');
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_app/src/Model/Entity/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @property \TestApp\Model\Entity\Author $author
* @property int $author_id
* @property \TestApp\Model\Entity\Tag[] $tags
* @property \DateTime $created
* @property \DateTimeInterface $created
*/
class Article extends Entity {
}

0 comments on commit 3418d09

Please sign in to comment.