@@ -35,26 +35,27 @@ public function setUp(): void
35
35
public function tearDown (): void
36
36
{
37
37
File::put (config ('laravel-git-workflow.composer_json ' ), $ this ->composer );
38
+ File::put (config ('laravel-git-workflow.composer_json ' ), $ this ->composer );
38
39
}
39
40
40
41
/** @test */
41
42
public function it_happily_switches_between_two_repos ()
42
43
{
43
44
$ composer = json_decode ($ this ->composer , true );
44
45
45
- $ this ->assertEquals (['type ' => 'path ' , 'url ' => '../../packages/ edgrosvenor/my-crazy-package ' ], $ composer ['repositories ' ][1 ]);
46
+ $ this ->assertEquals (['type ' => 'git ' , 'url ' => 'https://github.com/ edgrosvenor/my-crazy-package ' ], $ composer ['repositories ' ][2 ]);
46
47
47
48
$ this ->artisan ('repo my-crazy-package git ' );
48
49
49
50
$ updated = json_decode (File::get (config ('laravel-git-workflow.composer_json ' )), true );
50
51
51
- $ this ->assertEquals (['type ' => 'git ' , 'url ' => 'https://github.com/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][1 ]);
52
+ $ this ->assertEquals (['type ' => 'git ' , 'url ' => 'https://github.com/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][2 ]);
52
53
53
54
$ this ->artisan ('repo my-crazy-package path ' );
54
55
55
56
$ updated = json_decode (File::get (config ('laravel-git-workflow.composer_json ' )), true );
56
57
57
- $ this ->assertEquals (['type ' => 'path ' , 'url ' => '../../packages/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][1 ]);
58
+ $ this ->assertEquals (['type ' => 'path ' , 'url ' => '../../packages/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][2 ]);
58
59
59
60
$ this ->artisan ('repo my-crazy-package packagist ' );
60
61
@@ -66,13 +67,13 @@ public function it_happily_switches_between_two_repos()
66
67
67
68
$ updated = json_decode (File::get (config ('laravel-git-workflow.composer_json ' )), true );
68
69
69
- $ this ->assertEquals (['type ' => 'path ' , 'url ' => '../../packages/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][1 ]);
70
+ $ this ->assertEquals (['type ' => 'path ' , 'url ' => '../../packages/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][2 ]);
70
71
71
72
$ this ->artisan ('repo my-crazy-package git ' );
72
73
73
74
$ updated = json_decode (File::get (config ('laravel-git-workflow.composer_json ' )), true );
74
75
75
- $ this ->assertEquals (['type ' => 'git ' , 'url ' => 'https://github.com/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][1 ]);
76
+ $ this ->assertEquals (['type ' => 'git ' , 'url ' => 'https://github.com/edgrosvenor/my-crazy-package ' ], $ updated ['repositories ' ][2 ]);
76
77
}
77
78
78
79
/** @test */
0 commit comments