Commit 85155860 authored by Simon Welsh's avatar Simon Welsh

Add 4.5 PHPUnit_Framework_Assert and PHPUnit_Framework_TestCase

parents
.hhconfig
<?hh // decl
abstract class PHPUnit_Framework_Assert {
public function assertArrayHasKey(mixed $key, array $array, string $message = '');
public function assertArrayNotHasKey(mixed $key, array $array, string $message = '');
public function assertArraySubset(array $subset, array $array, bool $strict = false, string $message = '');
public function assertAttributeContains(mixed $needle, string $name, mixed $object, string $message = '');
public function assertAttributeContainsOnly(string $type, string $name, mixed $object, ?bool $isNativeType = null, string $message = '');
public function assertAttributeCount(int $expected, string $name, mixed $object, string $message = '');
public function assertAttributeEmpty(string $name, mixed $object, string $message = '');
public function assertAttributeEquals(mixed $expect, string $name, mixed $object, string $msg = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false);
public function assertAttributeGreaterThan(mixed $expected, string $name, mixed $object, string $message = '');
public function assertAttributeGreaterThanOrEqual(mixed $expected, string $name, mixed $object, string $message = '');
public function assertAttributeInstanceOf(string $expected, string $name, mixed $object, string $msg = '');
public function assertAttributeInternalType(string $expected, string $name, mixed $object, string $message = '');
public function assertAttributeLessThan(mixed $expected, string $name, mixed $object, string $message = '');
public function assertAttributeLessThanOrEqual(mixed $expected, string $name, mixed $object, string $message = '');
public function assertAttributeNotContains(mixed $needle, string $name, mixed $object, string $message = '');
public function assertAttributeNotContainsOnly(string $type, string $name, mixed $object, ?bool $isNativeType = null, string $message = '');
public function assertAttributeNotCount(int $expected, string $name, mixed $object, string $message = '');
public function assertAttributeNotEmpty(string $name, mixed $object, string $message = '');
public function assertAttributeNotEquals(mixed $expect, string $name, mixed $object, string $msg = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false);
public function assertAttributeNotInstanceOf(string $expected, string $name, mixed $object, string $msg = '');
public function assertAttributeNotInternalType(string $expected, string $name, mixed $object, string $message = '');
public function assertAttributeNotSame(mixed $expect, string $name, mixed $object, string $msg = '');
public function assertAttributeSame(mixed $expect, string $name, mixed $object, string $msg = '');
public function assertClassHasAttribute(string $name, string $class, string $message = '');
public function assertClassHasStaticAttribute(string $name, string $class, string $message = '');
public function assertClassNotHasAttribute(string $name, string $class, string $message = '');
public function assertClassNotHasStaticAttribute(string $name, string $class, string $message = '');
public function assertContains(mixed $needle, Traversable $array, string $msg = '');
public function assertContainsOnly(string $type, Traversable $array, ?bool $isNativeType = null, string $message = '');
public function assertContainsOnlyInstancesOf(string $class, Traversable $array, string $message = '');
public function assertCount(int $expected, mixed $haystack, string $message = '');
public function assertEmpty(mixed $actual, string $message = '');
public function assertEqualXMLStructure(DOMElement $expected, DOMElement $actual, bool $check = false, string $message = '');
public function assertEquals(mixed $expect, mixed $actual, string $msg = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false);
public function assertFalse(bool $condition, string $message = '');
public function assertFileEquals(string $expected, string $actual, string $message = '');
public function assertFileExists(string $filename, string $message = '');
public function assertFileNotEquals(string $expected, string $actual, string $message = '');
public function assertFileNotExists(string $filename, string $message = '');
public function assertGreaterThan(mixed $expected, mixed $actual, string $message = '');
public function assertGreaterThanOrEqual(mixed $expected, mixed $actual, string $message = '');
public function assertInstanceOf(string $expected, mixed $actual, string $msg = '');
public function assertInternalType(string $expected, mixed $actual, string $message = '');
public function assertJson(string $actual, string $message = '');
public function assertJsonFileEqualsJsonFile(string $expected, string $actual, string $message = '');
public function assertJsonFileNotEqualsJsonFile(string $expected, string $actual, string $message = '');
public function assertJsonStringEqualsJsonFile(string $expected, string $actual, string $message = '');
public function assertJsonStringEqualsJsonString(string $exepcted, string $actual, string $message = '');
public function assertJsonStringNotEqualsJsonFile(string $expected, string $actual, string $message = '');
public function assertJsonStringNotEqualsJsonString(string $exepcted, string $actual, string $message = '');
public function assertLessThan(mixed $expected, mixed $actual, string $message = '');
public function assertLessThanOrEqual(mixed $expected, mixed $actual, string $message = '');
public function assertNotContains(mixed $needle, Traversable $array, string $msg = '');
public function assertNotContainsOnly(string $type, Traversable $array, ?bool $isNativeType = null, string $message = '');
public function assertNotCount(int $expected, mixed $haystack, string $message = '');
public function assertNotEmpty(mixed $actual, string $message = '');
public function assertNotEquals(mixed $expect, mixed $actual, string $msg = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false);
public function assertNotFalse(mixed $condition, string $message = '');
public function assertNotInstanceOf(string $expected, mixed $actual, string $msg = '');
public function assertNotInternalType(string $expected, mixed $actual, string $message = '');
public function assertNotNull(mixed $actual, string $msg = '');
public function assertNotRegExp(string $pattern, string $string, string $message = '');
public function assertNotSame(mixed $expect, mixed $actual, string $msg = '');
public function assertNotSameSize(array $expected, array $actual, string $message = '');
public function assertNotTrue(mixed $conditions, string $message = '');
public function assertNull(mixed $actual, string $msg = '');
public function assertObjectHasAttribute(string $name, mixed $object, string $message = '');
public function assertObjectNotHasAttribute(string $name, mixed $object, string $message = '');
public function assertRegExp(string $pattern, string $string, string $message = '');
public function assertSame(mixed $expect, mixed $actual, string $msg = '');
public function assertSameSize(array $expected, array $actual, string $message = '');
public function assertStrignStartsNotWith(string $prefix, string $string, string $message = '');
public function assertStrignStartsWith(string $prefix, string $string, string $message = '');
public function assertStringEndsNotWith(string $suffix, string $string, string $message = '');
public function assertStringEndsWith(string $suffix, string $string, string $message = '');
public function assertStringEqualsFile(string $expected, string $catual, string $message = '');
public function assertStringMatchesFormat(string $format, string $string, string $message = '');
public function assertStringMatchesFormatFile(string $format, string $string, string $message = '');
public function assertStringNotEqualsFile(string $expected, string $catual, string $message = '');
public function assertStringNotMatchesFormat(string $format, string $string, string $message = '');
public function assertStringNotMatchesFormatFile(string $format, string $string, string $message = '');
public function assertThat(mixed $value, PHPUnit_Framework_Constraint $constraint, string $message = '');
public function assertTrue(bool $conditions, string $message = '');
public function assertXmlFileEqualsXmlFile(string $expected, string $actual, string $message = '');
public function assertXmlFileNotEqualsXmlFile(string $expected, string $actual, string $message = '');
public function assertXmlStringEqualsXmlFile(string $expected, string $actual, string $message = '');
public function assertXmlStringEqualsXmlString(string $expected, string $actual, string $message = '');
public function assertXmlStringNotEqualsXmlFile(string $expected, string $actual, string $message = '');
public function assertXmlStringNotEqualsXmlString(string $expected, string $actual, string $message = '');
public function fail(string $msg = '');
public function markTestIncomplete(string $message = '');
public function markTestSkipped(string $message = '');
}
<?hh // decl
class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert {
// Helpers
public function addToAssertionCount(int $count);
public function expectOutputRegex(string $expectedRegex);
public function expectOutputString(string $expectedString);
public function getActualOutput(): string;
public function getAnnotations(): array;
public function getExpectedException(): string;
public function getName(bool $withDataSet = true): string;
public function getNumAssertions(): int;
public function getResult(): mixed;
public function getSize(): int;
public function getStatus(): int;
public function getStatusMessage(): string;
public function hasDependencies(): bool;
public function hasExpectationOnOutput(): bool;
public function hasFailed(): bool;
public function hasOutput(): bool;
public function hasPerformedExpectationsOnOutput(): bool;
public function isInIsolation(): bool;
public function runBare();
public function setBackupGlobals(bool $backupGlobals);
public function setBackupStaticAttributes(bool $backupStaticAttributes);
public function setDependencies(array $dependencies);
public function setDependencyInput(array $dependencyInput);
public function setExpectedException(
mixed $exceptionName,
?string $exceptionMessage = '',
?int $exceptionCode = null
);
public function setExpectedExceptionRegExp(
mixed $exceptionName,
?string $exceptionMessageRegExp = '',
?int $exceptionCode = null
);
public function setInIsolation(bool $inIsolation);
public function setName(string $name);
public function setOutputCallback((function(string):string) $callback);
public function setPreserveGlobalState(bool $preserveGlobalState);
public function setResult(mixed $result);
public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess);
public function setUseErrorHandler(bool $useErrorHandler);
// Lifecycle
public static function setUpBeforeClass();
protected function setUp();
protected function assertPreConditions();
protected function assertPostConditions();
protected function tearDown();
public static function tearDownAfterClass();
}
Copyright (c) 2015 91 Carriage
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
* Except as contained in this notice, the name(s) of the above copyright holders
shall not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{
"name": "91carriage/phpunit-hhi",
"description": "HHI definitions for PHPUnit",
"keywords": ["phpunit", "testing", "hhvm", "hack"],
"homepage": "https://git.simon.geek.nz/simon_w/phpunit-hhi",
"license": ["MIT"],
"require": {
"hhvm": "*"
},
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
}
},
"support": {
"issues": "https://git.simon.geek.nz/simon_w/phpunit-hhi/issues",
"source": "https://git.simon.geek.nz/simon_w/phpunit-hhi/tree/master"
}
}
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