Пример #1
0
 /**
  * It should create a section property.
  *
  * @depends testCreateProperty
  */
 public function testCreateSection($property)
 {
     $name = 'foo';
     $parameters = ['foo', 'bar'];
     $colSpan = 6;
     $title = ['de' => 'Tite'];
     $description = ['de' => 'Description'];
     $this->section->getName()->willReturn($name);
     $this->section->getColSpan()->willReturn($colSpan);
     $this->section->getParameters()->willReturn($parameters);
     $this->section->title = $title;
     $this->section->description = $description;
     $this->section->getChildren()->willReturn([$property->reveal()]);
     $legacyProperty = $this->factory->createProperty($this->section->reveal());
     $this->assertInstanceOf(SectionPropertyInterface::class, $legacyProperty);
     $this->assertEquals($name, $legacyProperty->getName());
     $this->assertEquals($colSpan, $legacyProperty->getColspan());
     $this->assertEquals($title['de'], $legacyProperty->getTitle('de'));
     $this->assertEquals($description['de'], $legacyProperty->getInfoText('de'));
     $this->assertCount(1, $legacyProperty->getChildProperties());
 }