2016-10-13 05:53:30 +02:00
|
|
|
<?php
|
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
namespace SilverStripe\Dev\Tests;
|
|
|
|
|
|
|
|
|
2016-10-13 05:53:30 +02:00
|
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
|
|
|
|
|
2016-10-13 05:53:30 +02:00
|
|
|
class SapphireTestTest extends SapphireTest
|
|
|
|
{
|
|
|
|
public function testResolveFixturePath() {
|
|
|
|
// Same directory
|
|
|
|
$this->assertEquals(
|
|
|
|
__DIR__ . '/CsvBulkLoaderTest.yml',
|
|
|
|
$this->resolveFixturePath('./CsvBulkLoaderTest.yml')
|
|
|
|
);
|
|
|
|
// Filename only
|
|
|
|
$this->assertEquals(
|
|
|
|
__DIR__ . '/CsvBulkLoaderTest.yml',
|
|
|
|
$this->resolveFixturePath('CsvBulkLoaderTest.yml')
|
|
|
|
);
|
|
|
|
// Parent path
|
|
|
|
$this->assertEquals(
|
2016-10-14 03:30:05 +02:00
|
|
|
dirname(__DIR__) . '/ORM/DataObjectTest.yml',
|
|
|
|
$this->resolveFixturePath('../ORM/DataObjectTest.yml')
|
2016-10-13 05:53:30 +02:00
|
|
|
);
|
|
|
|
// Absolute path
|
|
|
|
$this->assertEquals(
|
2016-10-14 03:30:05 +02:00
|
|
|
dirname(__DIR__) . '/ORM/DataObjectTest.yml',
|
|
|
|
$this->resolveFixturePath(dirname(__DIR__) .'/ORM/DataObjectTest.yml')
|
2016-10-13 05:53:30 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|