|
@@ -22,14 +22,12 @@ public function test_contract_pdf_view_does_not_contain_old_phone_fields(): void
|
|
|
|
|
|
|
|
$student = new Student();
|
|
$student = new Student();
|
|
|
$student->name = 'Test Student';
|
|
$student->name = 'Test Student';
|
|
|
- $student->document_number = '12345678901';
|
|
|
|
|
$student->phone = '11999999999';
|
|
$student->phone = '11999999999';
|
|
|
|
|
|
|
|
$unit = new Unit();
|
|
$unit = new Unit();
|
|
|
$unit->fantasy_name = 'Test Unit';
|
|
$unit->fantasy_name = 'Test Unit';
|
|
|
- $unit->cnpj = '00.000.000/0001-00';
|
|
|
|
|
- $unit->city = (object)['name' => 'Test City'];
|
|
|
|
|
- $unit->state = (object)['code' => 'SP'];
|
|
|
|
|
|
|
+ $unit->city = clone (object)['name' => 'Test City'];
|
|
|
|
|
+ $unit->state = clone (object)['code' => 'SP'];
|
|
|
|
|
|
|
|
$packageUnit = new ClassPackageUnit();
|
|
$packageUnit = new ClassPackageUnit();
|
|
|
$package = new ClassPackage();
|
|
$package = new ClassPackage();
|
|
@@ -39,6 +37,8 @@ public function test_contract_pdf_view_does_not_contain_old_phone_fields(): void
|
|
|
$contract->setRelation('student', $student);
|
|
$contract->setRelation('student', $student);
|
|
|
$contract->setRelation('unit', $unit);
|
|
$contract->setRelation('unit', $unit);
|
|
|
$contract->setRelation('classPackageUnit', $packageUnit);
|
|
$contract->setRelation('classPackageUnit', $packageUnit);
|
|
|
|
|
+
|
|
|
|
|
+ $contract->setAttribute('installments', 1); // Attribute, not relation
|
|
|
|
|
|
|
|
$html = View::make('student-contracts.contract', ['contract' => $contract])->render();
|
|
$html = View::make('student-contracts.contract', ['contract' => $contract])->render();
|
|
|
|
|
|