Пример #1
0
 /**
  * Test that a ProjectProfile can be edited via form.
  */
 public function testEditForm()
 {
     $admin = $this->createSuperuser();
     $this->be($admin);
     $project = $this->createProject();
     $projectProfile = $this->createProjectProfile($project);
     $this->call('GET', route('project.profile.edit', ['project' => $project->id, 'profile' => $projectProfile->id]));
     $this->assertResponseOk();
     $this->call('PUT', route('project.profile.update', ['project' => $project->id, 'profile' => $projectProfile->id]), ['title' => 'Test2', 'value' => 'Test Value', '_token' => Session::token()]);
     $this->assertRedirectedToRoute('project.show', ['project' => $project->id]);
     $projectProfile = ProjectProfile::find($projectProfile->id);
     $this->assertNotNull($projectProfile);
     $this->assertEquals('project.profile.title.test2', $projectProfile->translatedTitle);
 }