| @@ 40-59 (lines=20) @@ | ||
| 37 | /** |
|
| 38 | * @depends testCreate |
|
| 39 | */ |
|
| 40 | public function testEdit() |
|
| 41 | { |
|
| 42 | $client = static::createClient(); |
|
| 43 | $crawler = $client->request('GET', '/inventory/'); |
|
| 44 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 45 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 46 | $crawler = $client->click($crawler->filter('table.records_list tbody tr td .btn-group a')->eq(1)->link()); |
|
| 47 | $form = $crawler->filter('form button[type="submit"]')->form(array( |
|
| 48 | 'inventory[date]' => new \DateTime(), |
|
| 49 | 'inventory[active]' => true, |
|
| 50 | 'inventory[amount]' => 10.99, |
|
| 51 | 'inventory[file]' => 'Changed', |
|
| 52 | // ... adapt fields value here ... |
|
| 53 | )); |
|
| 54 | $client->submit($form); |
|
| 55 | $crawler = $client->followRedirect(); |
|
| 56 | $crawler = $client->click($crawler->filter('.record_actions a')->link()); |
|
| 57 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 58 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * @depends testCreate |
|
| @@ 40-59 (lines=20) @@ | ||
| 37 | /** |
|
| 38 | * @depends testCreate |
|
| 39 | */ |
|
| 40 | public function testEdit() |
|
| 41 | { |
|
| 42 | $client = static::createClient(); |
|
| 43 | $crawler = $client->request('GET', '/admin/settings/'); |
|
| 44 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 45 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 46 | $crawler = $client->click($crawler->filter('table.records_list tbody tr td .btn-group a')->eq(1)->link()); |
|
| 47 | $form = $crawler->filter('form button[type="submit"]')->form(array( |
|
| 48 | 'settings[inventoryStyle]' => 'Changed', |
|
| 49 | 'settings[calculation]' => 'Changed', |
|
| 50 | 'settings[firstInventory]' => new \DateTime(), |
|
| 51 | 'settings[currency]' => 'Changed', |
|
| 52 | // ... adapt fields value here ... |
|
| 53 | )); |
|
| 54 | $client->submit($form); |
|
| 55 | $crawler = $client->followRedirect(); |
|
| 56 | $crawler = $client->click($crawler->filter('.record_actions a')->link()); |
|
| 57 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 58 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * @depends testCreate |
|
| @@ 40-59 (lines=20) @@ | ||
| 37 | /** |
|
| 38 | * @depends testCreate |
|
| 39 | */ |
|
| 40 | public function testEdit() |
|
| 41 | { |
|
| 42 | $client = static::createClient(); |
|
| 43 | $crawler = $client->request('GET', '/suppliers/'); |
|
| 44 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 45 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 46 | $crawler = $client->click($crawler->filter('table.records_list tbody tr td .btn-group a')->eq(1)->link()); |
|
| 47 | $form = $crawler->filter('form button[type="submit"]')->form(array( |
|
| 48 | 'supplier[delaydeliv]' => 42, |
|
| 49 | 'supplier[orderdate]' => 'Changed', |
|
| 50 | 'supplier[active]' => true, |
|
| 51 | 'supplier[slug]' => 'Changed', |
|
| 52 | // ... adapt fields value here ... |
|
| 53 | )); |
|
| 54 | $client->submit($form); |
|
| 55 | $crawler = $client->followRedirect(); |
|
| 56 | $crawler = $client->click($crawler->filter('.record_actions a')->link()); |
|
| 57 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 58 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * @depends testCreate |
|
| @@ 39-57 (lines=19) @@ | ||
| 36 | /** |
|
| 37 | * @depends testCreate |
|
| 38 | */ |
|
| 39 | public function testEdit() |
|
| 40 | { |
|
| 41 | $client = static::createClient(); |
|
| 42 | $crawler = $client->request('GET', '/admin/Settings/Divers/UnitStorage/'); |
|
| 43 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 44 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 45 | $crawler = $client->click($crawler->filter('table.records_list tbody tr td .btn-group a')->eq(1)->link()); |
|
| 46 | $form = $crawler->filter('form button[type="submit"]')->form(array( |
|
| 47 | 'unitstorage[name]' => 'Changed', |
|
| 48 | 'unitstorage[abbr]' => 'Changed', |
|
| 49 | 'unitstorage[slug]' => 'Changed', |
|
| 50 | // ... adapt fields value here ... |
|
| 51 | )); |
|
| 52 | $client->submit($form); |
|
| 53 | $crawler = $client->followRedirect(); |
|
| 54 | $crawler = $client->click($crawler->filter('.record_actions a')->link()); |
|
| 55 | $this->assertCount(0, $crawler->filter('table.records_list tbody tr:contains("First value")')); |
|
| 56 | $this->assertCount(1, $crawler->filter('table.records_list tbody tr:contains("Changed")')); |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * @depends testCreate |
|