# |
Jul 16th 2019, 11:22 |
neon1024 |
None, it just quits |
# |
Jul 16th 2019, 11:22 |
neon1024 |
Hmm, I wonder what has upset it |
# |
Jul 16th 2019, 11:22 |
aivaras.godliauskas |
any errors on console? |
# |
Jul 16th 2019, 11:21 |
graziel |
7.1.5 |
# |
Jul 16th 2019, 11:21 |
neon1024 |
Are you on PHP 7.3? |
# |
Jul 16th 2019, 11:20 |
graziel |
works ok for me |
# |
Jul 16th 2019, 11:20 |
neon1024 |
`3.7.9` |
# |
Jul 16th 2019, 11:20 |
graziel |
@neon1024 which cake version? |
# |
Jul 16th 2019, 11:17 |
neon1024 |
I mean, I can use `php -a`, but I thought that the console worked for basic php stuff also |
# |
Jul 16th 2019, 11:16 |
neon1024 |
..and it’ll just quit immediately to command line |
# |
Jul 16th 2019, 11:16 |
neon1024 |
Then try something like `echo 'Hello';` |
# |
Jul 16th 2019, 11:16 |
neon1024 |
`bin/cake console` |
# |
Jul 16th 2019, 11:16 |
neon1024 |
Does anyone elses console not work any more? |
# |
Jul 16th 2019, 11:02 |
neon1024 |
Looks like it’ll be random each time the fixture is inserted though |
# |
Jul 16th 2019, 11:01 |
neon1024 |
Oh, cool |
# |
Jul 16th 2019, 10:58 |
admad |
@neon1024 https://github.com/gourmet/faker |
# |
Jul 16th 2019, 10:45 |
neon1024 |
I guess it’s hard to know the right field to match faker |
# |
Jul 16th 2019, 10:44 |
neon1024 |
I should do that :slightly_smiling_face: |
# |
Jul 16th 2019, 10:44 |
neon1024 |
Just a bake theme? |
# |
Jul 16th 2019, 10:43 |
neon1024 |
How easy is it to plop Faker into the bake for Fixtures? |
# |
Jul 16th 2019, 10:19 |
neon1024 |
I have a `deleted_date` field and bake was populating it with a datetime, so my code thought it was deleted |
# |
Jul 16th 2019, 10:18 |
neon1024 |
Ah, I found it! |
# |
Jul 16th 2019, 10:17 |
neon1024 |
I’ve loaded the fixtures, and checked that the id’s are correct |
# |
Jul 16th 2019, 10:17 |
neon1024 |
Anyone have any ideas why my Rules are failing with controller integration tests |
# |
Jul 16th 2019, 09:41 |
graziel |
```protected function _getBodyAsString() { if (!$this->_response) { $this->fail('No response set, cannot assert content.'); } return (string)$this->_response->getBody(); }``` |
# |
Jul 16th 2019, 09:41 |
graziel |
its exactly whats in its body ``` |
# |
Jul 16th 2019, 09:40 |
neon1024 |
@graziel Awesome, that’s a bit better, although I prefer to see it’s coming from the response |
# |
Jul 16th 2019, 09:39 |
graziel |
@neon1024 its in tests? there is also `$this->_getBodyAsString()` |
# |
Jul 16th 2019, 09:39 |
neon1024 |
`'_existsIn' => string(25) "This value does not exist"` |
# |
Jul 16th 2019, 09:39 |
neon1024 |
When doing integration tests, my data rules are failing, and I can’t figure out why |
# |
Jul 16th 2019, 09:37 |
neon1024 |
I’m with @dereuromark on this one, it’s a bad choice in the PSR interface |
# |
Jul 16th 2019, 09:36 |
neon1024 |
I did |
# |
Jul 16th 2019, 09:36 |
graziel |
@neon1024 just cast it to string `(string)$this->_response->getBody();` |
# |
Jul 16th 2019, 09:28 |
neon1024 |
`"result": false` seems I have bigger fish to fry this morning! ;) |
# |
Jul 16th 2019, 09:28 |
neon1024 |
Ah well :man-shrugging: |
# |
Jul 16th 2019, 09:27 |
neon1024 |
I don’t like code which doesn’t describe it’s functionality |
# |
Jul 16th 2019, 09:26 |
dereuromark |
also see my old PR for docs: https://github.com/cakephp/docs/pull/5956 |
# |
Jul 16th 2019, 09:25 |
dereuromark |
i know :slightly_smiling_face: i complained about this a while ago. The apparently documented (string) cast is enough they say. |
# |
Jul 16th 2019, 09:24 |
neon1024 |
`var_dump($this->_response->getBody()->__toString());` seems to be the way, which is horrible |
# |
Jul 16th 2019, 09:23 |
neon1024 |
There isn’t a clear method for ‘getting the response as human readable string’ |
# |
Jul 16th 2019, 09:23 |
dereuromark |
ah, actually `bin/cake i18n extract --plugin Queue` does put it into the plugins src/Locale folder :slightly_smiling_face: |