Skip to content

Commit

Permalink
Prepare 5.0.2 release.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Apr 6, 2020
1 parent 3ce901d commit 4607429
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 39 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG-5.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/tenanti`.

## 5.0.2

Released: 2020-04-06

### Fixes

* Fixes variable used when merging `$migrator` for command output.

## 5.0.1

Released: 2020-04-03
Expand Down
64 changes: 25 additions & 39 deletions tests/Unit/Migrator/MigratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Mockery as m;
use Orchestra\Tenanti\Migrator\Migrator;
use PHPUnit\Framework\TestCase;
use Orchestra\Tenanti\Notice\Command as NoticeCommand;

class MigratorTest extends TestCase
{
Expand All @@ -17,13 +18,8 @@ protected function tearDown(): void
m::close();
}

/**
* Test Orchestra\Tenanti\Migrator\Migrator::setEntity()
* method.
*
* @test
*/
public function testSetEntityMethod()
/** @test */
public function it_can_set_entity_method()
{
$repository = m::mock('Illuminate\Database\Migrations\MigrationRepositoryInterface');
$resolver = m::mock('Illuminate\Database\ConnectionResolver');
Expand All @@ -36,12 +32,22 @@ public function testSetEntityMethod()
}

/**
* Test Orchestra\Tenanti\Migrator\Migrator::runUp()
* method.
*
* @test
*/
public function testRunUpMethod()
public function it_can_set_notice_resolver_to_migrator()
{
$output = m::mock('Symfony\Component\Console\Output\OutputInterface');
$notice = new NoticeCommand($output);

$migrator = m::mock(Migrator::class);
$migrator->shouldReceive('setOutput')->once()->with($output)->andReturnSelf();

$notice->mergeWith($migrator);
$this->addToAssertionCount(1);
}

/** @test */
public function it_can_run_up_migration()
{
$repository = m::mock('Illuminate\Database\Migrations\MigrationRepositoryInterface');
$resolver = m::mock('Illuminate\Database\ConnectionResolver');
Expand Down Expand Up @@ -71,13 +77,8 @@ public function testRunUpMethod()
$this->assertNull($stub->runUp($file, $batch, $pretend));
}

/**
* Test Orchestra\Tenanti\Migrator\Migrator::runUp()
* method when pretending.
*
* @test
*/
public function testRunUpMethodWhenPretending()
/** @test */
public function it_can_run_up_migration_while_pretending()
{
$repository = m::mock('Illuminate\Database\Migrations\MigrationRepositoryInterface');
$resolver = m::mock('Illuminate\Database\ConnectionResolver');
Expand All @@ -103,13 +104,8 @@ public function testRunUpMethodWhenPretending()
$this->assertNull($stub->runUp($file, $batch, $pretend));
}

/**
* Test Orchestra\Tenanti\Migrator\Migrator::runDown()
* method.
*
* @test
*/
public function testRunDownMethod()
/** @test */
public function it_can_run_down_migration()
{
$repository = m::mock('Illuminate\Database\Migrations\MigrationRepositoryInterface');
$resolver = m::mock('Illuminate\Database\ConnectionResolver');
Expand Down Expand Up @@ -139,13 +135,8 @@ public function testRunDownMethod()
$this->assertNull($stub->runDown($file, $migration, $pretend));
}

/**
* Test Orchestra\Tenanti\Migrator\Migrator::runDown()
* method when pretending.
*
* @test
*/
public function testRunDownMethodWhenPretending()
/** @test */
public function it_can_run_down_migration_while_pretending()
{
$repository = m::mock('Illuminate\Database\Migrations\MigrationRepositoryInterface');
$resolver = m::mock('Illuminate\Database\ConnectionResolver');
Expand All @@ -171,13 +162,8 @@ public function testRunDownMethodWhenPretending()
$this->assertNull($stub->runDown($file, $migration, $pretend));
}

/**
* Test Orchestra\Tenanti\Migrator\Migrator::getQueries()
* method when pretending.
*
* @test
*/
public function testGetQueriesMethodWhenPretending()
/** @test */
public function it_can_get_queries_while_pretending()
{
$repository = m::mock('Illuminate\Database\Migrations\MigrationRepositoryInterface');
$resolver = m::mock('Illuminate\Database\ConnectionResolver');
Expand Down

0 comments on commit 4607429

Please sign in to comment.