Make tests compatible with laravel 5.4

This commit is contained in:
James Cole 2017-02-12 12:32:13 +01:00
parent 018af62826
commit 79f94771c3
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
6 changed files with 20 additions and 19 deletions

View File

@ -95,7 +95,7 @@ class ImportControllerTest extends TestCase
$this->be($this->user());
$response = $this->post(route('import.process-configuration', ['p-configure']), $data);
$response->assertStatus(302);
$this->assertRedirectedToRoute('import.settings', ['p-configure']);
$response->assertRedirect(route('import.settings', ['p-configure']));
}
/**
@ -110,7 +110,7 @@ class ImportControllerTest extends TestCase
$this->be($this->user());
$response = $this->post(route('import.post-settings', ['p-settings']), $data);
$response->assertStatus(302);
$this->assertRedirectedToRoute('import.settings', ['p-settings']);
$response->assertRedirect(route('import.settings', ['p-settings']));
}
/**
@ -124,7 +124,7 @@ class ImportControllerTest extends TestCase
$this->be($this->user());
$response = $this->get(route('import.settings', ['settings']));
$response->assertStatus(302);
$this->assertRedirectedToRoute('import.complete', ['settings']);
$response->assertRedirect(route('import.complete', ['settings']));
}
/**

View File

@ -11,6 +11,7 @@ declare(strict_types = 1);
namespace Tests\Feature\Controllers;
use FireflyIII\Models\PiggyBank;
use Tests\TestCase;
class PiggyBankControllerTest extends TestCase
@ -72,7 +73,7 @@ class PiggyBankControllerTest extends TestCase
$response = $this->post(route('piggy-banks.destroy', [2]));
$response->assertStatus(302);
$response->assertSessionHas('success');
$this->assertRedirectedToRoute('index');
$response->assertRedirect(route('index'));
}
/**
@ -116,7 +117,7 @@ class PiggyBankControllerTest extends TestCase
$this->be($this->user());
$response = $this->post(route('piggy-banks.add', [1]), $data);
$response->assertStatus(302);
$this->assertRedirectedToRoute('piggy-banks.index');
$response->assertRedirect(route('piggy-banks.index'));
$response->assertSessionHas('success');
}
@ -137,7 +138,7 @@ class PiggyBankControllerTest extends TestCase
$this->be($this->user());
$response = $this->post(route('piggy-banks.add', [$piggy->id]), $data);
$response->assertStatus(302);
$this->assertRedirectedToRoute('piggy-banks.index');
$response->assertRedirect(route('piggy-banks.index'));
$response->assertSessionHas('success');
}
@ -150,7 +151,7 @@ class PiggyBankControllerTest extends TestCase
$this->be($this->user());
$response = $this->post(route('piggy-banks.remove', [1]), $data);
$response->assertStatus(302);
$this->assertRedirectedToRoute('piggy-banks.index');
$response->assertRedirect(route('piggy-banks.index'));
$response->assertSessionHas('success');
}
@ -203,7 +204,7 @@ class PiggyBankControllerTest extends TestCase
$response = $this->post(route('piggy-banks.store'), $data);
$response->assertStatus(302);
$response->assertSessionHas('success');
$this->assertRedirectedToRoute('index');
$response->assertRedirect(route('index'));
}
/**
@ -223,7 +224,7 @@ class PiggyBankControllerTest extends TestCase
$response = $this->post(route('piggy-banks.update', [3]), $data);
$response->assertStatus(302);
$response->assertSessionHas('success');
$this->assertRedirectedToRoute('index');
$response->assertRedirect(route('index'));
}

View File

@ -37,7 +37,7 @@ class PreferencesControllerTest extends TestCase
$response->assertStatus(302);
$response->assertSessionHas('success');
$response->assertSessionHas('info');
$this->assertRedirectedToRoute('preferences.index');
$response->assertRedirect(route('preferences.index'));
}
/**
@ -72,7 +72,7 @@ class PreferencesControllerTest extends TestCase
$response = $this->post(route('preferences.update'), $data);
$response->assertStatus(302);
$response->assertSessionHas('success');
$this->assertRedirectedToRoute('preferences.index');
$response->assertRedirect(route('preferences.index'));
}
}

View File

@ -81,7 +81,7 @@ class ProfileControllerTest extends TestCase
$this->be($this->user());
$response = $this->post(route('profile.delete-account.post'), $data);
$response->assertStatus(302);
$this->assertRedirectedToRoute('index');
$response->assertRedirect(route('index'));
}
}

View File

@ -51,7 +51,7 @@ class RuleControllerTest extends TestCase
$response = $this->post(route('rules.destroy', [1]));
$response->assertStatus(302);
$response->assertSessionHas('success');
$this->assertRedirectedToRoute('index');
$response->assertRedirect(route('index'));
}
/**
@ -62,7 +62,7 @@ class RuleControllerTest extends TestCase
$this->be($this->user());
$response = $this->get(route('rules.down', [1]));
$response->assertStatus(302);
$this->assertRedirectedToRoute('rules.index');
$response->assertRedirect(route('rules.index'));
}
/**
@ -176,7 +176,7 @@ class RuleControllerTest extends TestCase
$this->be($this->user());
$response = $this->get(route('rules.up', [1]));
$response->assertStatus(302);
$this->assertRedirectedToRoute('rules.index');
$response->assertRedirect(route('rules.index'));
}
/**

View File

@ -51,7 +51,7 @@ class RuleGroupControllerTest extends TestCase
$response = $this->post(route('rule-groups.destroy', [1]));
$response->assertStatus(302);
$response->assertSessionHas('success');
$this->assertRedirectedToRoute('index');
$response->assertRedirect(route('index'));
}
/**
@ -62,7 +62,7 @@ class RuleGroupControllerTest extends TestCase
$this->be($this->user());
$response = $this->get(route('rule-groups.down', [1]));
$response->assertStatus(302);
$this->assertRedirectedToRoute('rules.index');
$response->assertRedirect(route('rules.index'));
}
/**
@ -91,7 +91,7 @@ class RuleGroupControllerTest extends TestCase
$response = $this->post(route('rule-groups.execute', [1]), $data);
$response->assertStatus(302);
$response->assertSessionHas('success');
$this->assertRedirectedToRoute('rules.index');
$response->assertRedirect(route('rules.index'));
}
/**
@ -134,7 +134,7 @@ class RuleGroupControllerTest extends TestCase
$this->be($this->user());
$response = $this->get(route('rule-groups.up', [1]));
$response->assertStatus(302);
$this->assertRedirectedToRoute('rules.index');
$response->assertRedirect(route('rules.index'));
}
/**