summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authortof <>2007-12-11 07:33:26 +0000
committertof <>2007-12-11 07:33:26 +0000
commitc0cff04fba123dce9b91ecf13282571debbe6e6a (patch)
tree7a3dfcbae980eaa1e658810c1f1ee256b7e978fd /tests/unit
parentbfa6bb80c959affbc36b672a2165be3ff3847405 (diff)
Clean up some unit tests to allow them run with PHPUnit 3.1+
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/Web/UI/THtmlWriterTest.php12
-rw-r--r--tests/unit/Xml/TXmlElementListTest.php2
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/unit/Web/UI/THtmlWriterTest.php b/tests/unit/Web/UI/THtmlWriterTest.php
index fa5bb954..ddbdabcf 100644
--- a/tests/unit/Web/UI/THtmlWriterTest.php
+++ b/tests/unit/Web/UI/THtmlWriterTest.php
@@ -66,7 +66,7 @@ class THtmlWriterTest extends PHPUnit_Framework_TestCase {
$writer=new THtmlWriter(self::$output);
$writer->addAttributes(array ('type' => 'text', 'value' => 'Prado & Cie'));
// get the private var _attributes
- $result=self::getAttribute($writer, '_attributes');
+ $result=self::readAttribute($writer, '_attributes');
self::assertEquals('text',$result['type']);
self::assertEquals(THttpUtility::htmlEncode('Prado & Cie'), $result['value']);
}
@@ -75,7 +75,7 @@ class THtmlWriterTest extends PHPUnit_Framework_TestCase {
$writer=new THtmlWriter(self::$output);
$writer->addAttribute('type','text');
$writer->addAttribute('value','Prado & Cie');
- $result=self::getAttribute($writer, '_attributes');
+ $result=self::readAttribute($writer, '_attributes');
self::assertEquals('text',$result['type']);
self::assertEquals(THttpUtility::htmlEncode('Prado & Cie'), $result['value']);
}
@@ -85,7 +85,7 @@ class THtmlWriterTest extends PHPUnit_Framework_TestCase {
$writer->addAttribute('type','text');
$writer->addAttribute('value','Prado & Cie');
$writer->removeAttribute('value');
- $result=self::getAttribute($writer, '_attributes');
+ $result=self::readAttribute($writer, '_attributes');
// 'type' should be present, 'value' not
self::assertTrue(isset($result['type']));
self::assertFalse(isset($result['value']));
@@ -94,7 +94,7 @@ class THtmlWriterTest extends PHPUnit_Framework_TestCase {
public function testAddStyleAttributes() {
$writer=new THtmlWriter(self::$output);
$writer->addStyleAttributes(array ('font-size' => '1em', 'background-image'=>'url(image.gif)'));
- $result=self::getAttribute($writer, '_styles');
+ $result=self::readAttribute($writer, '_styles');
self::assertEquals('1em', $result['font-size']);
self::assertEquals(THttpUtility::htmlEncode('url(image.gif)'), $result['background-image']);
}
@@ -103,7 +103,7 @@ class THtmlWriterTest extends PHPUnit_Framework_TestCase {
$writer=new THtmlWriter(self::$output);
$writer->addStyleAttribute('font-size','1em');
$writer->addStyleAttribute('background-image','url(image.gif)');
- $result=self::getAttribute($writer, '_styles');
+ $result=self::readAttribute($writer, '_styles');
self::assertEquals('1em', $result['font-size']);
self::assertEquals(THttpUtility::htmlEncode('url(image.gif)'), $result['background-image']);
}
@@ -113,7 +113,7 @@ class THtmlWriterTest extends PHPUnit_Framework_TestCase {
$writer->addStyleAttribute('font-size','1em');
$writer->addStyleAttribute('background-image','url(image.gif)');
$writer->removeStyleAttribute('font-size');
- $result=self::getAttribute($writer, '_styles');
+ $result=self::readAttribute($writer, '_styles');
self::assertTrue(isset($result['background-image']));
self::assertFalse(isset($result['font-size']));
}
diff --git a/tests/unit/Xml/TXmlElementListTest.php b/tests/unit/Xml/TXmlElementListTest.php
index 91e09267..16384078 100644
--- a/tests/unit/Xml/TXmlElementListTest.php
+++ b/tests/unit/Xml/TXmlElementListTest.php
@@ -11,7 +11,7 @@ class TXmlElementListTest extends PHPUnit_Framework_TestCase {
public function testConstruct() {
$element=new TXmlElement('tag');
$list=new TXmlElementList($element);
- self::assertEquals($element,self::getAttribute($list, '_o'));
+ self::assertEquals($element,self::readAttribute($list, '_o'));
}
public function testInsertAt() {