Skip to content

Commit

Permalink
Fix test namespaces (#1346)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Dec 10, 2023
2 parents 30a2bf0 + d14992a commit b5ab15e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/PHP80/Php80LanguageFeaturesTest.php
@@ -1,6 +1,6 @@
<?php

namespace test\Mockery;
namespace Mockery\Tests\PHP80;

use ArrayIterator;
use DateTime;
Expand All @@ -16,15 +16,15 @@ class Php80LanguageFeaturesTest extends MockeryTestCase
{
public function testMockingIteratorAggregateDoesNotImplementIterator()
{
$mock = mock('test\Mockery\ImplementsIteratorAggregate');
$mock = mock(ImplementsIteratorAggregate::class);
$this->assertInstanceOf('IteratorAggregate', $mock);
$this->assertInstanceOf('Traversable', $mock);
$this->assertNotInstanceOf('Iterator', $mock);
}

public function testMockingIteratorDoesNotImplementIterator()
{
$mock = mock('test\Mockery\ImplementsIterator');
$mock = mock(ImplementsIterator::class);
$this->assertInstanceOf('Iterator', $mock);
$this->assertInstanceOf('Traversable', $mock);
}
Expand Down
9 changes: 5 additions & 4 deletions tests/PHP81/Php81LanguageFeaturesTest.php
@@ -1,10 +1,11 @@
<?php

namespace test\Mockery;
namespace Mockery\Tests\PHP81;

use DateTime;
use Mockery;
use Mockery\Adapter\Phpunit\MockeryTestCase;
use PDO;
use ReturnTypeWillChange;
use RuntimeException;
use Serializable;
Expand All @@ -24,7 +25,7 @@ class Php81LanguageFeaturesTest extends MockeryTestCase
*/
public function canMockClassesThatImplementSerializable()
{
$mock = mock("test\Mockery\ClassThatImplementsSerializable");
$mock = mock(ClassThatImplementsSerializable::class);
$this->assertInstanceOf("Serializable", $mock);
}

Expand All @@ -41,9 +42,9 @@ public function it_can_mock_an_internal_class_with_tentative_return_types()
*/
public function it_can_mock_an_internal_class_with_tentative_union_return_types()
{
$mock = Mockery::mock('PDO');
$mock = Mockery::mock(PDO::class);

$this->assertInstanceOf('PDO', $mock);
$this->assertInstanceOf(PDO::class, $mock);

$mock->shouldReceive('exec')->once();

Expand Down
2 changes: 1 addition & 1 deletion tests/PHP82/Php82LanguageFeaturesTest.php
@@ -1,6 +1,6 @@
<?php

namespace test\Mockery;
namespace Mockery\Tests\PHP82;

use Mockery;
use Mockery\Adapter\Phpunit\MockeryTestCase;
Expand Down

0 comments on commit b5ab15e

Please sign in to comment.