@@ -11,7 +11,8 @@ class EtlTest extends TestCase
11
11
public function extract_step ()
12
12
{
13
13
$ extractor = $ this ->createMock ('Marquine\Etl\Extractors\Extractor ' );
14
- $ extractor ->expects ($ this ->once ())->method ('options ' )->with (['option ' => 'value ' , 'input ' => 'input ' ]);
14
+ $ extractor ->expects ($ this ->once ())->method ('input ' )->with ('input ' )->willReturnSelf ();
15
+ $ extractor ->expects ($ this ->once ())->method ('options ' )->with (['options ' ]);
15
16
16
17
$ container = $ this ->createMock ('Marquine\Etl\Container ' );
17
18
$ container ->expects ($ this ->once ())->method ('step ' )->with ('step_name ' , 'Marquine\Etl\Extractors\Extractor ' )->willReturn ($ extractor );
@@ -21,14 +22,14 @@ public function extract_step()
21
22
22
23
$ etl = new Etl ($ container , $ pipeline );
23
24
24
- $ this ->assertInstanceOf (Etl::class, $ etl ->extract ('step_name ' , 'input ' , ['option ' => ' value ' ]));
25
+ $ this ->assertInstanceOf (Etl::class, $ etl ->extract ('step_name ' , 'input ' , ['options ' ]));
25
26
}
26
27
27
28
/** @test */
28
29
public function transform_step ()
29
30
{
30
31
$ transformer = $ this ->createMock ('Marquine\Etl\Transformers\Transformer ' );
31
- $ transformer ->expects ($ this ->once ())->method ('options ' )->with (['option ' => ' value ' ]);
32
+ $ transformer ->expects ($ this ->once ())->method ('options ' )->with (['options ' ]);
32
33
33
34
$ container = $ this ->createMock ('Marquine\Etl\Container ' );
34
35
$ container ->expects ($ this ->once ())->method ('step ' )->with ('step_name ' , 'Marquine\Etl\Transformers\Transformer ' )->willReturn ($ transformer );
@@ -38,14 +39,15 @@ public function transform_step()
38
39
39
40
$ etl = new Etl ($ container , $ pipeline );
40
41
41
- $ this ->assertInstanceOf (Etl::class, $ etl ->transform ('step_name ' , ['option ' => ' value ' ]));
42
+ $ this ->assertInstanceOf (Etl::class, $ etl ->transform ('step_name ' , ['options ' ]));
42
43
}
43
44
44
45
/** @test */
45
46
public function load_step ()
46
47
{
47
48
$ loader = $ this ->createMock ('Marquine\Etl\Loaders\Loader ' );
48
- $ loader ->expects ($ this ->once ())->method ('options ' )->with (['option ' => 'value ' , 'output ' => 'output ' ]);
49
+ $ loader ->expects ($ this ->once ())->method ('output ' )->with ('output ' )->willReturnSelf ();
50
+ $ loader ->expects ($ this ->once ())->method ('options ' )->with (['options ' ]);
49
51
50
52
$ container = $ this ->createMock ('Marquine\Etl\Container ' );
51
53
$ container ->expects ($ this ->once ())->method ('step ' )->with ('step_name ' , 'Marquine\Etl\Loaders\Loader ' )->willReturn ($ loader );
@@ -55,7 +57,7 @@ public function load_step()
55
57
56
58
$ etl = new Etl ($ container , $ pipeline );
57
59
58
- $ this ->assertInstanceOf (Etl::class, $ etl ->load ('step_name ' , 'output ' , ['option ' => ' value ' ]));
60
+ $ this ->assertInstanceOf (Etl::class, $ etl ->load ('step_name ' , 'output ' , ['options ' ]));
59
61
}
60
62
61
63
/** @test */
0 commit comments