public function testWrongRootType() { $this->if($object = new testedClass())->and($config = array('root' => array('_type' => 'text')))->then->exception(function () use($object, $config) { $object->build($config); })->hasMessage("Only array root nodes are supported"); }