Commit 81d2d6d8 authored by Simon Welsh's avatar Simon Welsh

Update existing tests

Updates test classes to extend the namespace version and changes
depreaction tests to test for removal
parent d006010b
......@@ -3,28 +3,28 @@
namespace PHPUnitHHI;
class TestCaseTest extends HHITest {
public function testDeprecatedGetMock(): void {
$this->runTestFile('testcase/deprecated/getMock');
public function testRemovedGetMock(): void {
$this->runTestFile('testcase/removed/getMock');
}
public function testDeprecatedGetMockWithoutInvokingTheOriginalConstructor(
public function testRemovedGetMockWithoutInvokingTheOriginalConstructor(
): void {
$this->runTestFile(
'testcase/deprecated/getMockWithoutInvokingTheOriginalConstructor',
'testcase/removed/getMockWithoutInvokingTheOriginalConstructor',
);
}
public function testDeprecatedHasPerformedExpectationsOnOutput(): void {
$this->runTestFile(
'testcase/deprecated/hasPerformedExpectationsOnOutput',
);
public function testRemovedHasPerformedExpectationsOnOutput(): void {
$this->runTestFile('testcase/removed/hasPerformedExpectationsOnOutput');
}
public function testRemovedSetExpectedException(): void {
$this->runTestFile('testcase/removed/setExpectedException');
}
public function testDeprecatedSetExpectedException(): void {
$this->runTestFile('testcase/deprecated/setExpectedException');
public function testRemovedSetExpectedExceptionRegExp(): void {
$this->runTestFile('testcase/removed/setExpectedExceptionRegExp');
}
public function testDeprecatedSetExpectedExceptionRegExp(): void {
$this->runTestFile('testcase/deprecated/setExpectedExceptionRegExp');
}
}
---FILE---
<?hh // strict
class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
class PHPUnit_Hhi_Test extends PHPUnit\Framework\TestCase {
public function testAssertFalse(): void {
// Check that assertFalse takes only a string for its message
$this->assertFalse(false, 'Message');
......
---FILE---
<?hh // strict
class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
class PHPUnit_Hhi_Test extends PHPUnit\Framework\TestCase {
public function testAssertFalse(): void {
// Check that assertFalse takes mixed values
$this->assertFalse(true);
......
---FILE---
<?hh // strict
class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
class PHPUnit_Hhi_Test extends PHPUnit\Framework\TestCase {
public function testGetMock(): void {
$mock = $this->getMock(self::class);
}
......@@ -9,4 +9,4 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
---PASS---
0
---ERRORS---
5:4128:The method getMock is deprecated: Use createMock() or getMockBuilder() instead. Definition is here.
5:4053:Could not find method getMock in an object of type PHPUnit_Hhi_Test. This is why I think it is an object of type PHPUnit_Hhi_Test. Declaration of PHPUnit_Hhi_Test is here.
---FILE---
<?hh // strict
class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
class PHPUnit_Hhi_Test extends PHPUnit\Framework\TestCase {
public function testGetMockWithoutInvokingTheOriginalConstructor(): void {
$mock = $this->getMockWithoutInvokingTheOriginalConstructor(self::class);
}
......@@ -9,4 +9,4 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
---PASS---
0
---ERRORS---
5:4128:The method getMockWithoutInvokingTheOriginalConstructor is deprecated: Use createMock() instead. Definition is here.
5:4053:Could not find method getMockWithoutInvokingTheOriginalConstructor in an object of type PHPUnit_Hhi_Test. This is why I think it is an object of type PHPUnit_Hhi_Test. Declaration of PHPUnit_Hhi_Test is here.
---FILE---
<?hh // strict
class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
class PHPUnit_Hhi_Test extends PHPUnit\Framework\TestCase {
public function testHasPerformedExpectationsOnOutput(): void {
$this->hasPerformedExpectationsOnOutput();
}
......@@ -9,5 +9,4 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
---PASS---
0
---ERRORS---
5:4128:The method hasPerformedExpectationsOnOutput is deprecated: Use hasExpectationOnOutput() instead. Definition is here.
5:4053:Could not find method hasPerformedExpectationsOnOutput in an object of type PHPUnit_Hhi_Test. This is why I think it is an object of type PHPUnit_Hhi_Test. Declaration of PHPUnit_Hhi_Test is here.
---FILE---
<?hh // strict
class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
class PHPUnit_Hhi_Test extends PHPUnit\Framework\TestCase {
public function testSetExpectedException(): void {
$this->setExpectedException(self::class, 'n');
}
......@@ -9,5 +9,4 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
---PASS---
0
---ERRORS---
5:4128:The method setExpectedException is deprecated: Use expectException() and expectExceptionMessage() instead. Definition is here.
5:4053:Could not find method setExpectedException in an object of type PHPUnit_Hhi_Test. This is why I think it is an object of type PHPUnit_Hhi_Test. Declaration of PHPUnit_Hhi_Test is here.
---FILE---
<?hh // strict
class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
class PHPUnit_Hhi_Test extends PHPUnit\Framework\TestCase {
public function testSetExpectedExceptionRegExp(): void {
$this->setExpectedExceptionRegExp(self::class, 'n');
}
......@@ -9,5 +9,4 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
---PASS---
0
---ERRORS---
5:4128:The method setExpectedExceptionRegExp is deprecated: Use expectException() and expectExceptionMessageRegExp() instead. Definition is here.
5:4053:Could not find method setExpectedExceptionRegExp in an object of type PHPUnit_Hhi_Test. This is why I think it is an object of type PHPUnit_Hhi_Test. Declaration of PHPUnit_Hhi_Test is here.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment