withoutAttribute example

$this->assertEquals('you', $link->getAttributes()['me']);
    }

    public function testCanRemoveValues()
    {
        $link = (new Link())
            ->withHref('http://www.google.com')
            ->withRel('next')
            ->withAttribute('me', 'you')
        ;

        $link = $link->withoutAttribute('me')
            ->withoutRel('next');

        $this->assertEquals('http://www.google.com', $link->getHref());
        $this->assertFalse(\in_array('next', $link->getRels()));
        $this->assertArrayNotHasKey('me', $link->getAttributes());
    }

    public function testMultipleRels()
    {
        $link = (new Link())
            ->withHref('http://www.google.com')
            
Home | Imprint | This part of the site doesn't use cookies.