File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,7 @@ public function getConfigTreeBuilder() : TreeBuilder
48
48
->children ()
49
49
->arrayNode ('migrations_paths ' )
50
50
->info ('A list of namespace/path pairs where to look for migrations. ' )
51
- ->isRequired ()
52
- ->requiresAtLeastOneElement ()
51
+ ->defaultValue ([])
53
52
->useAttributeAsKey ('namespace ' )
54
53
->prototype ('scalar ' )->end ()
55
54
->end ()
Original file line number Diff line number Diff line change @@ -87,20 +87,19 @@ public function testFullConfig() : void
87
87
$ this ->assertConfigs ($ config );
88
88
}
89
89
90
- public function testNoConfig () : void
90
+ public function testNoConfigsAreNeeded () : void
91
91
{
92
- $ this ->expectException (InvalidConfigurationException::class);
93
- $ this ->expectExceptionMessage ('The child node "migrations_paths" at path "doctrine_migrations" must be configured. ' );
94
-
95
92
$ container = $ this ->getContainer ([]);
96
93
97
94
$ conn = $ this ->createMock (Connection::class);
98
95
$ container ->set ('doctrine.dbal.default_connection ' , $ conn );
99
96
$ container ->compile ();
100
97
101
- $ container ->get ('doctrine.migrations.configuration ' );
102
- }
98
+ $ config = $ container ->get ('doctrine.migrations.configuration ' );
103
99
100
+ self ::assertInstanceOf (Configuration::class, $ config );
101
+ self ::assertSame ([], $ config ->getMigrationDirectories ());
102
+ }
104
103
105
104
private function assertConfigs (?object $ config ) : void
106
105
{
You can’t perform that action at this time.
0 commit comments