Skip to content

Commit 5318dbe

Browse files
committed
test: update snapshots
1 parent 9b24caa commit 5318dbe

9 files changed

Lines changed: 18 additions & 28 deletions

src/View/View.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,6 @@ public function setEngine(string $engine): View
157157
return static::getInstance();
158158
}
159159

160-
/**
161-
* Set the availability of caching system
162-
*
163-
* @param bool $cachabled
164-
* @return void
165-
*/
166-
public function cachable(bool $cachabled): void
167-
{
168-
$this->cachabled = $cachabled;
169-
}
170-
171160
/**
172161
* @param string $extension
173162
* @return View

tests/Console/__snapshots__/GeneratorDeepTest__test_generate_cache_migration_stubs__1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
use Bow\Database\Migration\Migration;
4-
use Bow\Database\Migration\SQLGenerator;
4+
use Bow\Database\Migration\SQLGenerator as Table;
55

66
class FakeCacheMigration extends Migration
77
{
@@ -10,7 +10,7 @@ class FakeCacheMigration extends Migration
1010
*/
1111
public function up(): void
1212
{
13-
$this->create("caches", function (SQLGenerator $table) {
13+
$this->create("caches", function (Table $table) {
1414
$table->addString('keyname', ['primary' => true, 'size' => 500]);
1515
$table->addText('data');
1616
$table->addDatetime('expire', ['nullable' => true]);

tests/Console/__snapshots__/GeneratorDeepTest__test_generate_create_migration_stubs__1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
use Bow\Database\Migration\Migration;
4-
use Bow\Database\Migration\SQLGenerator;
4+
use Bow\Database\Migration\SQLGenerator as Table;
55

66
class FakeCreateTableMigration extends Migration
77
{
@@ -10,7 +10,7 @@ class FakeCreateTableMigration extends Migration
1010
*/
1111
public function up(): void
1212
{
13-
$this->create("fakers", function (SQLGenerator $table) {
13+
$this->create("fakers", function (Table $table) {
1414
$table->addIncrement('id');
1515
$table->addTimestamps();
1616
});

tests/Console/__snapshots__/GeneratorDeepTest__test_generate_queue_migration_stubs__1.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
use Bow\Database\Migration\Migration;
4-
use Bow\Database\Migration\SQLGenerator;
4+
use Bow\Database\Migration\SQLGenerator as Table;
55

66
class QueueTableMigration extends Migration
77
{
@@ -10,7 +10,7 @@ class QueueTableMigration extends Migration
1010
*/
1111
public function up(): void
1212
{
13-
$this->create("queues", function (SQLGenerator $table) {
13+
$this->create("queues", function (Table $table) {
1414
$table->addString('id', ["primary" => true]);
1515
$table->addString('queue');
1616
$table->addText('payload');
@@ -31,7 +31,8 @@ class QueueTableMigration extends Migration
3131
public function rollback(): void
3232
{
3333
$this->dropIfExists("queues");
34-
if ($this->adapter->getName() === 'pgsql') {
34+
35+
if ($this->getAdapterName() === 'pgsql') {
3536
$this->addSql("DROP TYPE IF EXISTS queue_status");
3637
}
3738
}

tests/Console/__snapshots__/GeneratorDeepTest__test_generate_session_migration_stubs__1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
use Bow\Database\Migration\Migration;
4-
use Bow\Database\Migration\SQLGenerator;
4+
use Bow\Database\Migration\SQLGenerator as Table;
55

66
class FakeSessionMigration extends Migration
77
{
@@ -10,7 +10,7 @@ class FakeSessionMigration extends Migration
1010
*/
1111
public function up(): void
1212
{
13-
$this->create("sessions", function (SQLGenerator $table) {
13+
$this->create("sessions", function (Table $table) {
1414
$table->addColumn('id', 'string', ['primary' => true]);
1515
$table->addColumn('time', 'timestamp');
1616
$table->addColumn('data', 'text');

tests/Console/__snapshots__/GeneratorDeepTest__test_generate_standard_migration_stubs__1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
use Bow\Database\Migration\Migration;
4-
use Bow\Database\Migration\SQLGenerator;
4+
use Bow\Database\Migration\SQLGenerator as Table;
55

66
class FakeStandardTableMigration extends Migration
77
{
@@ -10,7 +10,7 @@ class FakeStandardTableMigration extends Migration
1010
*/
1111
public function up(): void
1212
{
13-
$this->create("fakers", function (SQLGenerator $table) {
13+
$this->create("fakers", function (Table $table) {
1414
//
1515
});
1616
}

tests/Console/__snapshots__/GeneratorDeepTest__test_generate_table_migration_stubs__1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
use Bow\Database\Migration\Migration;
4-
use Bow\Database\Migration\SQLGenerator;
4+
use Bow\Database\Migration\SQLGenerator as Table;
55

66
class FakeTableMigration extends Migration
77
{
@@ -10,7 +10,7 @@ class FakeTableMigration extends Migration
1010
*/
1111
public function up(): void
1212
{
13-
$this->alter("fakers", function (SQLGenerator $table) {
13+
$this->alter("fakers", function (Table $table) {
1414
//
1515
});
1616
}

tests/Console/__snapshots__/GeneratorDeepTest__test_generate_validation_stubs__1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class FakeValidationRequest extends RequestValidation
1111
*
1212
* @return array
1313
*/
14-
protected function rules()
14+
protected function rules(): array
1515
{
1616
return [
1717
// Your roles here

tests/View/ViewTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static function tearDownAfterClass(): void
2828

2929
public function test_twig_compilation()
3030
{
31-
View::getInstance()->cachable(false);
31+
View::getInstance();
3232

3333
$result = View::parse('twig', ['name' => 'bow', 'engine' => 'twig']);
3434

@@ -37,7 +37,7 @@ public function test_twig_compilation()
3737

3838
public function test_tintin_compilation()
3939
{
40-
View::getInstance()->setEngine('tintin')->setExtension('.tintin.php')->cachable(false);
40+
View::getInstance()->setEngine('tintin')->setExtension('.tintin.php');
4141

4242
$result = View::parse('tintin', ['name' => 'bow', 'engine' => 'tintin']);
4343

@@ -46,7 +46,7 @@ public function test_tintin_compilation()
4646

4747
public function test_php_compilation()
4848
{
49-
View::getInstance()->setEngine('php')->setExtension('.php')->cachable(false);
49+
View::getInstance()->setEngine('php')->setExtension('.php');
5050

5151
$result = View::parse('php', ['name' => 'bow', 'engine' => 'php']);
5252

0 commit comments

Comments
 (0)