-
Notifications
You must be signed in to change notification settings - Fork 888
Expand file tree
/
Copy pathConfigSeedPathsTest.php
More file actions
49 lines (40 loc) · 1.03 KB
/
ConfigSeedPathsTest.php
File metadata and controls
49 lines (40 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace Test\Phinx\Config;
use Phinx\Config\Config;
use UnexpectedValueException;
/**
* Class ConfigSeedPathsTest
*
* @package Test\Phinx\Config
* @group config
* @covers \Phinx\Config\Config::getSeedPaths
*/
class ConfigSeedPathsTest extends AbstractConfigTestCase
{
public function testGetSeedPathsThrowsExceptionForNoPath()
{
$config = new Config([]);
$this->expectException(UnexpectedValueException::class);
$config->getSeedPaths();
}
/**
* Normal behavior
*/
public function testGetSeedPaths()
{
$config = new Config($this->getConfigArray());
$this->assertEquals($this->getSeedPaths(), $config->getSeedPaths());
}
public function testGetSeedPathConvertsStringToArray()
{
$values = [
'paths' => [
'seeds' => '/test',
],
];
$config = new Config($values);
$paths = $config->getSeedPaths();
$this->assertIsArray($paths);
$this->assertCount(1, $paths);
}
}