diff --git a/tests/IntegratedTest.php b/tests/IntegratedTest.php index 45fd514..c1406ec 100644 --- a/tests/IntegratedTest.php +++ b/tests/IntegratedTest.php @@ -13,6 +13,15 @@ public function test_new_package_is_created() $this->seeInConsoleOutput('Package created successfully!'); } + public function test_new_package_is_installed() + { + Artisan::call('packager:new', ['vendor' => 'MyVendor', 'name' => 'MyPackage']); + + $composer = file_get_contents(base_path('composer.json')); + + $this->assertStringContainsString('MyVendor/MyPackage', $composer); + } + public function test_get_existing_package() { Artisan::call('packager:get', @@ -37,4 +46,14 @@ public function test_removing_package() Artisan::call('packager:remove', ['vendor' => 'MyVendor', 'name' => 'MyPackage', '--no-interaction' => true]); $this->seeInConsoleOutput('Package removed successfully!'); } + + public function test_new_package_is_uninstalled() + { + Artisan::call('packager:new', ['vendor' => 'MyVendor', 'name' => 'MyPackage']); + Artisan::call('packager:remove', ['vendor' => 'MyVendor', 'name' => 'MyPackage', '--no-interaction' => true]); + + $composer = file_get_contents(base_path('composer.json')); + + $this->assertStringNotContainsString('MyVendor/MyPackage', $composer); + } }