# |
May 20th 2017, 10:30 |
birdy247 |
$this->assertArrayHasKey('organiser_id', $result); - passes |
# |
May 20th 2017, 10:30 |
birdy247 |
gives a failure - expected |
# |
May 20th 2017, 10:30 |
birdy247 |
$this->assertArrayHasKey('organisers_id', $result); |
# |
May 20th 2017, 10:29 |
birdy247 |
The test runs ok |
# |
May 20th 2017, 10:29 |
saeideng |
and class name |
# |
May 20th 2017, 10:29 |
saeideng |
what is your function test name? |
# |
May 20th 2017, 10:29 |
saeideng |
https://book.cakephp.org/3.0/en/development/testing.html |
# |
May 20th 2017, 10:28 |
birdy247 |
but my assert must be wrong |
# |
May 20th 2017, 10:28 |
birdy247 |
No, I can get failures on other tests |
# |
May 20th 2017, 10:28 |
saeideng |
probably you need rename phpunit.xml.dist |
# |
May 20th 2017, 10:27 |
birdy247 |
even if I change the expected to something wrong |
# |
May 20th 2017, 10:27 |
birdy247 |
no failures |
# |
May 20th 2017, 10:27 |
saeideng |
result |
# |
May 20th 2017, 10:27 |
saeideng |
you can see above rsult? |
# |
May 20th 2017, 10:26 |
saeideng |
FAILURES! Tests: 1, Assertions: 1, Failures: 1. |
# |
May 20th 2017, 10:26 |
birdy247 |
it says incomplete, skipped, or risky tests! |
# |
May 20th 2017, 10:25 |
birdy247 |
I am running a specific test |
# |
May 20th 2017, 10:25 |
saeideng |
write |
# |
May 20th 2017, 10:25 |
saeideng |
enter |
# |
May 20th 2017, 10:25 |
saeideng |
and wright phpunit |
# |
May 20th 2017, 10:25 |
birdy247 |
gitbash |
# |
May 20th 2017, 10:25 |
birdy247 |
yea |
# |
May 20th 2017, 10:25 |
saeideng |
or cmd in windows |
# |
May 20th 2017, 10:24 |
saeideng |
open console |
# |
May 20th 2017, 10:24 |
saeideng |
oh |
# |
May 20th 2017, 10:24 |
birdy247 |
Its my first test :) |
# |
May 20th 2017, 10:24 |
saeideng |
how you use phpunit? |
# |
May 20th 2017, 10:23 |
birdy247 |
How do I do that? |
# |
May 20th 2017, 10:23 |
saeideng |
echo your Failure message in console |
# |
May 20th 2017, 10:21 |
birdy247 |
This is my code |
# |
May 20th 2017, 10:20 |
saeideng |
and result of assertContains ? |
# |
May 20th 2017, 10:19 |
BurgerNix |
dude, use pastebin |
# |
May 20th 2017, 10:17 |
birdy247 |
That shows my fixture |
# |
May 20th 2017, 10:16 |
saeideng |
debug($result) |
# |
May 20th 2017, 10:15 |
birdy247 |
doesnt work |
# |
May 20th 2017, 10:15 |
birdy247 |
$this->assertContains($expected, $result); |
# |
May 20th 2017, 10:15 |
birdy247 |
$expected = [ ['id' => 1, 'organiser_id' => 1], ]; |
# |
May 20th 2017, 10:15 |
slackebot |
'sendgrid_list_id' => 1 ], |
# |
May 20th 2017, 10:15 |
slackebot |
feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.', 'title_color' => 'Lorem ipsum dolor sit amet', 'hidden' => 1, 'cover_bg_pos' => 'Lorem ipsum dolor |
# |
May 20th 2017, 10:15 |
slackebot |
duis vestibulum nunc mattis convallis.', 'img' => 'Lorem ipsum dolor sit amet', 'cover_img' => 'Lorem ipsum dolor sit amet', 'created' => '2017-05-18 07:57:44', 'modified' => '2017-05-18 07:57:44', 'lat' => 1.5, 'lng' => 1.5, 'user_id' => 1, 'feature' => 1, 'slug' => 'Lorem ipsum dolor sit amet', 'directions' => 'Lorem ipsum dolor sit |
# |
May 20th 2017, 10:15 |
birdy247 |
[ 'id' => 1, 'organiser_id' => 1, 'name' => 'Lorem ipsum dolor sit amet', 'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor digniss |