Skip to content

Commit

Permalink
Merge e1c36c7 into ff6f069
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Dec 1, 2017
2 parents ff6f069 + e1c36c7 commit 9ad0039
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/Mockery/ExpectationTest.php
Expand Up @@ -2023,13 +2023,13 @@ public function testCanReturnSelf()
public function testReturnsTrueIfTrueIsReturnValue()
{
$this->mock->shouldReceive("foo")->andReturnTrue();
$this->assertSame(true, $this->mock->foo());
$this->assertTrue($this->mock->foo());
}

public function testReturnsFalseIfFalseIsReturnValue()
{
$this->mock->shouldReceive("foo")->andReturnFalse();
$this->assertSame(false, $this->mock->foo());
$this->assertFalse($this->mock->foo());
}

public function testExpectationCanBeOverridden()
Expand Down
8 changes: 4 additions & 4 deletions tests/Mockery/MockingNullableMethodsTest.php
Expand Up @@ -184,7 +184,7 @@ public function it_allows_returning_null_for_nullable_object_return_types()

$double->shouldReceive("nullableClass")->andReturnNull();

$this->assertEquals(null, $double->nullableClass());
$this->assertNull($double->nullableClass());
}

/** @test */
Expand All @@ -194,7 +194,7 @@ public function it_allows_returning_null_for_nullable_string_return_types()

$double->shouldReceive("nullableString")->andReturnNull();

$this->assertEquals(null, $double->nullableString());
$this->assertNull($double->nullableString());
}

/** @test */
Expand All @@ -204,14 +204,14 @@ public function it_allows_returning_null_for_nullable_int_return_types()

$double->shouldReceive("nullableInt")->andReturnNull();

$this->assertEquals(null, $double->nullableInt());
$this->assertNull($double->nullableInt());
}

/** @test */
public function it_returns_null_on_calls_to_ignored_methods_of_spies_if_return_type_is_nullable()
{
$double = \Mockery::spy(MethodWithNullableReturnType::class);

$this->assertEquals(null, $double->nullableClass());
$this->assertNull($double->nullableClass());
}
}
4 changes: 2 additions & 2 deletions tests/Mockery/MockingParameterAndReturnTypesTest.php
Expand Up @@ -56,7 +56,7 @@ public function testMockingBooleanReturnType()
$mock = mock("test\Mockery\TestWithParameterAndReturnType");

$mock->shouldReceive("returnBoolean");
$this->assertSame(false, $mock->returnBoolean());
$this->assertFalse($mock->returnBoolean());
}

public function testMockingArrayReturnType()
Expand Down Expand Up @@ -108,7 +108,7 @@ public function testIgnoringMissingReturnsType()
$this->assertSame('', $mock->returnString());
$this->assertSame(0, $mock->returnInteger());
$this->assertSame(0.0, $mock->returnFloat());
$this->assertSame(false, $mock->returnBoolean());
$this->assertFalse( $mock->returnBoolean());
$this->assertSame([], $mock->returnArray());
$this->assertTrue(is_callable($mock->returnCallable()));
$this->assertInstanceOf("\Generator", $mock->returnGenerator());
Expand Down
2 changes: 1 addition & 1 deletion tests/Mockery/MockingProtectedMethodsTest.php
Expand Up @@ -53,7 +53,7 @@ public function shouldAutomaticallyDeferCallsToProtectedMethodsForRuntimePartial
public function shouldAutomaticallyIgnoreAbstractProtectedMethods()
{
$mock = mock("test\Mockery\TestWithProtectedMethods")->shouldDeferMissing();
$this->assertEquals(null, $mock->foo());
$this->assertNull($mock->foo());
}

/** @test */
Expand Down

0 comments on commit 9ad0039

Please sign in to comment.