You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-01-14 12:02:20 +03:00
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@581 a1433add-5e2c-0410-b055-b7f2511e0802
54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
<?php
|
|
// $Id: unit_tester_test.php,v 1.11 2006/11/06 13:56:37 lastcraft Exp $
|
|
|
|
class ReferenceForTesting {
|
|
}
|
|
|
|
class TestOfUnitTester extends UnitTestCase {
|
|
|
|
function testAssertTrueReturnsAssertionAsBoolean() {
|
|
$this->assertTrue($this->assertTrue(true));
|
|
}
|
|
|
|
function testAssertFalseReturnsAssertionAsBoolean() {
|
|
$this->assertTrue($this->assertFalse(false));
|
|
}
|
|
|
|
function testAssertEqualReturnsAssertionAsBoolean() {
|
|
$this->assertTrue($this->assertEqual(5, 5));
|
|
}
|
|
|
|
function testAssertIdenticalReturnsAssertionAsBoolean() {
|
|
$this->assertTrue($this->assertIdentical(5, 5));
|
|
}
|
|
|
|
function testCoreAssertionsDoNotThrowErrors() {
|
|
$this->assertIsA($this, 'UnitTestCase');
|
|
$this->assertNotA($this, 'WebTestCase');
|
|
}
|
|
|
|
function testReferenceAssertionOnObjects() {
|
|
$a = &new ReferenceForTesting();
|
|
$b = &$a;
|
|
$this->assertReference($a, $b);
|
|
}
|
|
|
|
function testReferenceAssertionOnScalars() {
|
|
$a = 25;
|
|
$b = &$a;
|
|
$this->assertReference($a, $b);
|
|
}
|
|
|
|
function testCloneOnObjects() {
|
|
$a = &new ReferenceForTesting();
|
|
$b = &new ReferenceForTesting();
|
|
$this->assertClone($a, $b);
|
|
}
|
|
|
|
function testCloneOnScalars() {
|
|
$a = 25;
|
|
$b = 25;
|
|
$this->assertClone($a, $b);
|
|
}
|
|
}
|
|
?>
|