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
4848 ->children ()
4949 ->arrayNode ('migrations_paths ' )
5050 ->info ('A list of namespace/path pairs where to look for migrations. ' )
51- ->isRequired ()
52- ->requiresAtLeastOneElement ()
51+ ->defaultValue ([])
5352 ->useAttributeAsKey ('namespace ' )
5453 ->prototype ('scalar ' )->end ()
5554 ->end ()
Original file line number Diff line number Diff line change @@ -87,20 +87,19 @@ public function testFullConfig() : void
8787 $ this ->assertConfigs ($ config );
8888 }
8989
90- public function testNoConfig () : void
90+ public function testNoConfigsAreNeeded () : void
9191 {
92- $ this ->expectException (InvalidConfigurationException::class);
93- $ this ->expectExceptionMessage ('The child node "migrations_paths" at path "doctrine_migrations" must be configured. ' );
94-
9592 $ container = $ this ->getContainer ([]);
9693
9794 $ conn = $ this ->createMock (Connection::class);
9895 $ container ->set ('doctrine.dbal.default_connection ' , $ conn );
9996 $ container ->compile ();
10097
101- $ container ->get ('doctrine.migrations.configuration ' );
102- }
98+ $ config = $ container ->get ('doctrine.migrations.configuration ' );
10399
100+ self ::assertInstanceOf (Configuration::class, $ config );
101+ self ::assertSame ([], $ config ->getMigrationDirectories ());
102+ }
104103
105104 private function assertConfigs (?object $ config ) : void
106105 {
You can’t perform that action at this time.
0 commit comments