Files
piratepoet/tests/integration/Config/MigratorTest.php
Jan Jakeš b39dac75d6 Autofix number of newlines between methods
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00

34 lines
868 B
PHP

<?php
namespace MailPoet\Test\Config;
use MailPoet\Config\Migrator;
class MigratorTest extends \MailPoetTest {
public $migrator;
public function _before() {
parent::_before();
$this->migrator = new Migrator();
}
public function testItCanGenerateTheSubscribersSql() {
$subscriberSql = $this->migrator->subscribers();
$expectedTable = $this->migrator->prefix . 'subscribers';
expect($subscriberSql)->contains($expectedTable);
}
public function testItDoesNotMigrateWhenDatabaseIsUpToDate() {
$changes = $this->migrator->up();
$this->assertIsArray($changes);
// phpcs:disable Squiz.PHP.CommentedOutCode
// $this->assertEmpty(
// $changes,
// "Expected no migrations. However, the following changes are planned:\n\t" . implode($changes, "\n\t")
// );
}
public function _after() {
}
}