Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php

namespace spec\Rector\PhpSpecToPHPUnit;

use PhpSpec\ObjectBehavior;

class TestClassMethod extends ObjectBehavior
{
public function let_1()
{
$this->shouldBeAnInstanceOf(\stdClass::class);
}

public function let_2()
{
$this->shouldHaveType(\stdClass::class);
}

public function let_3()
{
$this->shouldReturnAnInstanceOf(\stdClass::class);
}

public function let_4()
{
$this->shouldImplement(\stdClass::class);
}
}

?>
-----
<?php

namespace spec\Rector\PhpSpecToPHPUnit;

use PhpSpec\ObjectBehavior;

class TestClassMethod extends ObjectBehavior
{
public function let_1()
{
$this->assertInstanceOf(\stdClass::class, $this->testClassMethod);
}

public function let_2()
{
$this->assertInstanceOf(\stdClass::class, $this->testClassMethod);
}

public function let_3()
{
$this->assertInstanceOf(\stdClass::class, $this->testClassMethod);
}

public function let_4()
{
$this->assertInstanceOf(\stdClass::class, $this->testClassMethod);
}
}

?>
2 changes: 1 addition & 1 deletion src/Enum/ProphecyPromisesToPHPUnitAssertMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class ProphecyPromisesToPHPUnitAssertMap
* @var array<string, string[]>
*/
public const PROMISES_BY_ASSERT_METHOD = [
'assertInstanceOf' => ['shouldBeAnInstanceOf', 'shouldHaveType', 'shouldReturnAnInstanceOf'],
'assertInstanceOf' => ['shouldBeAnInstanceOf', 'shouldHaveType', 'shouldReturnAnInstanceOf', 'shouldImplement'],
'assertSame' => ['shouldBe', 'shouldReturn'],
'assertNotSame' => ['shouldNotBe', 'shouldNotReturn'],
'assertCount' => ['shouldHaveCount'],
Expand Down
Loading