assertEquals( 'Baba', gp_link_get( 'http://dir.bg/', 'Baba' ) ); } function test_gp_link_get_attributes() { $this->assertEquals( 'Baba', gp_link_get( 'http://dir.bg/', 'Baba', array( 'target' => '_blank', 'class' => 'edit' ) ) ); } function test_gp_link_get_should_put_the_before_attribute_before_the_link() { $this->assertEquals( 'xBaba', gp_link_get( 'http://dir.bg/', 'Baba', array( 'before' => 'x' ) ) ); } function test_gp_link_get_should_put_the_after_attribute_after_the_link() { $this->assertEquals( 'Babax', gp_link_get( 'http://dir.bg/', 'Baba', array( 'after' => 'x' ) ) ); } function test_gp_link_get_should_put_the_before_and_after_attributes_before_and_after_the_link() { $this->assertEquals( 'aBabab', gp_link_get( 'http://dir.bg/', 'Baba', array( 'before' => 'a', 'after' => 'b' ) ) ); } function test_gp_link_get_escape() { $this->assertEquals( 'Baba & Dyado', gp_link_get( 'http://dir.bg/', 'Baba & Dyado' ) ); $this->assertEquals( 'Baba', gp_link_get( 'http://dir.bg/?x=5&y=11', 'Baba' ) ); $this->assertEquals( 'Baba', gp_link_get( 'http://dir.bg/', 'Baba', array( 'a' => '"') ) ); } }