@@ 85-98 (lines=14) @@ | ||
82 | $this->object->adaptQueryBuilder($queryBuilder); |
|
83 | } |
|
84 | ||
85 | public function testFixedGetters() |
|
86 | { |
|
87 | $item = Stub::makeEmpty(AbstractPage::class, ['getId' => 123]); |
|
88 | $this->assertEquals('', $this->object->getAddUrlFor([])); |
|
89 | $this->assertEquals('KunstmaanNodeBundle', $this->object->getBundleName()); |
|
90 | $this->assertEquals('NodeTranslation', $this->object->getEntityName()); |
|
91 | $this->assertEquals('KunstmaanFormBundle:FormSubmissions', $this->object->getControllerPath()); |
|
92 | $this->assertCount(0, $this->object->getDeleteUrlFor($item)); |
|
93 | $this->assertCount(1, $this->object->getIndexUrl()); |
|
94 | $this->assertCount(2, $this->object->getEditUrlFor($item)); |
|
95 | $this->assertFalse($this->object->canAdd()); |
|
96 | $this->assertFalse($this->object->canEdit($item)); |
|
97 | $this->assertFalse($this->object->canDelete($item)); |
|
98 | } |
|
99 | ||
100 | public function testBuildFilters() |
|
101 | { |
@@ 90-104 (lines=15) @@ | ||
87 | $this->object->adaptQueryBuilder($queryBuilder); |
|
88 | } |
|
89 | ||
90 | public function testFixedGetters() |
|
91 | { |
|
92 | $item = Stub::makeEmpty(AbstractPage::class, ['getId' => 123]); |
|
93 | $this->assertEquals('', $this->object->getAddUrlFor([])); |
|
94 | $this->assertEquals('KunstmaanFormBundle', $this->object->getBundleName()); |
|
95 | $this->assertEquals('FormSubmission', $this->object->getEntityName()); |
|
96 | $this->assertCount(0, $this->object->getDeleteUrlFor($item)); |
|
97 | $this->assertCount(2, $this->object->getIndexUrl()); |
|
98 | $this->assertCount(2, $this->object->getEditUrlFor($item)); |
|
99 | $this->assertCount(2, $this->object->getExportUrl()); |
|
100 | $this->assertFalse($this->object->canAdd()); |
|
101 | $this->assertFalse($this->object->canEdit($item)); |
|
102 | $this->assertFalse($this->object->canDelete($item)); |
|
103 | $this->assertTrue($this->object->canExport()); |
|
104 | } |
|
105 | ||
106 | public function testBuildFilters() |
|
107 | { |