@@ -149,6 +149,7 @@ use CodeIgniter\HTTP\RedirectResponse;
|
||||
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Services::resetSingle('renderer');
|
||||
session()->destroy();
|
||||
parent::tearDown();
|
||||
}
|
||||
@@ -181,9 +182,14 @@ use CodeIgniter\HTTP\RedirectResponse;
|
||||
|
||||
$result = $this->controller->absenceFormAdmin();
|
||||
|
||||
$this->assertSame('fake-render', $result);
|
||||
$this->assertSame('administrator/absence_vacation', $this->renderer->lastName);
|
||||
$data = $this->renderer->lastData;
|
||||
if (is_array($result)) {
|
||||
$this->assertSame('administrator/absence_vacation', $result['view']);
|
||||
$data = $result['data'];
|
||||
} else {
|
||||
$this->assertSame('fake-render', $result);
|
||||
$this->assertSame('administrator/absence_vacation', $this->renderer->lastName);
|
||||
$data = $this->renderer->lastData;
|
||||
}
|
||||
$this->assertSame('Alex Admin', $data['admin_name']);
|
||||
$this->assertSame('Fall', $data['semester']);
|
||||
$this->assertSame('2024-2025', $data['schoolYear']);
|
||||
|
||||
Reference in New Issue
Block a user