Skip to content

Commit

Permalink
Increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed Aug 29, 2024
1 parent 4f4eeba commit aebd505
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/unit/PackageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,23 @@ public function testBootPassingModulesEmitDeprecation(): void
}
}

/**
* @test
* @runInSeparateProcess
*/
public function testBootPassingModulesAddModules(): void
{
$module1 = $this->stubModule('module_1', ServiceModule::class);
$module1->allows('services')->andReturn($this->stubServices('service_1'));

$package = Package::new($this->stubProperties('test', true));

$this->ignoreDeprecations();
$package->boot($module1);

static::assertSame('service_1', $package->container()->get('service_1')['id']);
}

/**
* @test
*/
Expand Down Expand Up @@ -620,6 +637,7 @@ static function (Package $package) use (&$log): void {
$package->boot();

static::assertSame(range(0, 4), $log);
static::assertCount(1, $package->connectedPackages());
}

/**
Expand Down Expand Up @@ -684,6 +702,7 @@ static function (Package $package) use (&$log): void {
$package->build()->boot();

static::assertSame(range(0, 4), $log);
static::assertCount(1, $package->connectedPackages());
}

/**
Expand Down Expand Up @@ -742,6 +761,7 @@ static function (Package $package) use (&$log): void {
$package->build();

static::assertSame(range(0, 3), $log);
static::assertCount(1, $package->connectedPackages());
}

/**
Expand Down

0 comments on commit aebd505

Please sign in to comment.