mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
30 lines
779 B
PHP
30 lines
779 B
PHP
<?php
|
|
|
|
class DMSTaxonomyTypeExtensionTest extends SapphireTest
|
|
{
|
|
protected $usesDatabase = true;
|
|
|
|
protected $requiredExtensions = array(
|
|
'TaxonomyType' => array('DMSTaxonomyTypeExtension')
|
|
);
|
|
|
|
/**
|
|
* Ensure that the configurable list of default records are created
|
|
*/
|
|
public function testDefaultRecordsAreCreated()
|
|
{
|
|
Config::inst()->update('DMSTaxonomyTypeExtension', 'default_records', array('Food', 'Beverage', 'Books'));
|
|
|
|
TaxonomyType::create()->requireDefaultRecords();
|
|
|
|
$this->assertDOSContains(
|
|
array(
|
|
array('Name' => 'Food'),
|
|
array('Name' => 'Beverage'),
|
|
array('Name' => 'Books'),
|
|
),
|
|
TaxonomyType::get()
|
|
);
|
|
}
|
|
}
|