@@ -48,22 +48,12 @@ public function testBundle()
4848
4949 public function testFactory ()
5050 {
51- $ this -> markTestSkipped ( ' Incomplete after refactor ' );
51+ $ factory = new DataTableFactory ([ ' language_from_cdn ' => false ], $ this -> createMock (TwigRenderer::class) );
5252
53- $ factory = new DataTableFactory (['class_name ' => 'foo ' ], ['dom ' => 'bar ' ], $ this ->createMock (TwigRenderer::class));
54- $ factory ->setAdapterLocator (new ServiceLocator ([]));
55-
56- $ table = $ factory ->create (['name ' => 'bar ' ], ['pageLength ' => 684 ]);
57- $ this ->assertSame ('bar ' , $ table ->getSetting ('name ' ));
58- $ this ->assertSame ('foo ' , $ table ->getSetting ('class_name ' ));
59- $ this ->assertSame ('bar ' , $ table ->getOption ('dom ' ));
53+ $ table = $ factory ->create (['pageLength ' => 684 , 'dom ' => 'bar ' ]);
6054 $ this ->assertSame (684 , $ table ->getOption ('pageLength ' ));
61- $ this ->assertArrayHasKey ('name ' , $ table ->getSettings ());
62-
63- $ table = $ factory ->create (['class_name ' => 'bar ' ], ['dom ' => 'foo ' ]);
64- $ this ->assertSame ('bar ' , $ table ->getSetting ('class_name ' ));
65- $ this ->assertSame ('foo ' , $ table ->getOption ('dom ' ));
66- $ this ->assertNull ($ table ->getSetting ('none ' ));
55+ $ this ->assertSame ('bar ' , $ table ->getOption ('dom ' ));
56+ $ this ->assertFalse ($ table ->isLanguageFromCDN ());
6757 $ this ->assertNull ($ table ->getOption ('invalid ' ));
6858
6959 $ table ->setAdapter (new ArrayAdapter ());
@@ -72,10 +62,7 @@ public function testFactory()
7262
7363 public function testFactoryRemembersInstances ()
7464 {
75- $ this ->markTestSkipped ('Incomplete after refactor ' );
76-
77- $ factory = new DataTableFactory ([], [], $ this ->createMock (TwigRenderer::class));
78- $ factory ->setAdapterLocator (new ServiceLocator ([]));
65+ $ factory = new DataTableFactory ([], $ this ->createMock (TwigRenderer::class));
7966
8067 $ reflection = new \ReflectionClass (DataTableFactory::class);
8168 $ property = $ reflection ->getProperty ('resolvedTypes ' );
0 commit comments