Source of file SearchableClassTest.php
Size: 0,977 Bytes - Last Modified: 2021-12-23T10:58:34+00:00
/var/www/docs.ssmods.com/process/src/tests/short/SearchableClassTest.php
1234567891011121314151617181920212223242526272829303132333435363738 | <?php /** * Test the functionality SearchableClass. */ class SearchableClassTest extends ElasticsearchTestBase { public function testCMSFields() { $sc = new SearchableClass(); $sc->Name = 'TestField'; $sc->InSiteTree = false; $sc->write(); $fields = $sc->getCMSFields(); $tab = $this->checkTabExists($fields, 'Main'); //Check fields $nf = $this->checkFieldExists($tab, 'Name'); $this->assertTrue($nf->isDisabled()); //FIXME - why does this fail? $this->assertTrue($nf->isReadOnly()); //Check for existence of grid field $nf = $this->checkFieldExists($tab, 'SearchableField'); } public function testIsInSiteTreeHumanReadable() { $sc = new SearchableClass(); $this->assertEquals('No', $sc->IsInSiteTreeHumanReadable()); $sc->InSiteTree = true; $this->assertEquals('Yes', $sc->IsInSiteTreeHumanReadable()); } } |