コード例 #1
0
ファイル: HtmlTagTest.php プロジェクト: apexstudios/yamwlib
 public function testClassCanBeRemoved()
 {
     $tag = new HtmlTag('somename');
     $tag->addClass(array('class1', 'class2', 'class3'));
     $tag->removeClass('class2');
     $test_classes = $tag->getClasses();
     self::assertFalse(strpos('class2', $test_classes));
     // Remove one from the end
     $tag->removeClass('class3');
     $test_classes = $tag->getClasses();
     self::assertFalse(strpos('class3', $test_classes));
     // Don't accidentally remove class1 when removing class
     $tag->removeClass('class');
     self::assertEquals($test_classes, $tag->getClasses());
 }