public function testCreateBySelector() { $element = Element::createBySelector('li.item.active', 'Foo', ['data-id' => 1]); $this->assertEquals('li', $element->tag); $this->assertEquals('Foo', $element->text()); $this->assertEquals(['class' => 'item active', 'data-id' => 1], $element->attributes()); }