Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 5
CRAP
0.00% covered (danger)
0.00%
0 / 19
ATagTest
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 5
42
0.00% covered (danger)
0.00%
0 / 19
 setUp
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 tearDown
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 testAfterAdd
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 6
 testTagPropertiesToString
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 6
 testDraw
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 4
<?php
namespace Test\Ease\Html;
use Ease\Html\ATag;
/**
 * Generated by PHPUnit_SkeletonGenerator on 2016-01-17 at 23:59:15.
 */
class ATagTest extends PairTagTest
{
    /**
     * @var ATag
     */
    protected $object;
    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    protected function setUp()
    {
        $this->object = new \Ease\Html\ATag('http://v.s.cz/', 'Vitex Software');
    }
    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown()
    {
    }
    /**
     * @covers Ease\Html\ATag::afterAdd
     */
    public function testAfterAdd()
    {
        $keeps                                       = ['test' => 'testing', 'test2' => true];
        \Ease\Shared::webPage()->requestValuesToKeep = $keeps;
        $this->object->afterAdd();
        $this->assertEquals('http://v.s.cz/?test=testing',
            $this->object->getTagProperty('href'));
    }
    /**
     * @covers Ease\Html\ATag::tagPropertiesToString
     */
    public function testTagPropertiesToString()
    {
        $this->object->setTagProperties(['id' => 'Test', 'name' => 'unit']);
        $this->assertEquals('href="http://v.s.cz/" id="Test" name="unit"',
            $this->object->tagPropertiesToString());
        $this->assertEquals('id="Test2" name="unit2"',
            $this->object->tagPropertiesToString(['id' => 'Test2', 'name' => 'unit2']));
    }
    /**
     * @covers Ease\Html\ATag::draw
     */
    public function testDraw($whatWant = null)
    {
        if (is_null($whatWant)) {
            $whatWant = "\n<a href=\"http://v.s.cz/\">Vitex Software</a>";
        }
        parent::testDraw($whatWant);
    }
}