Log message #4183701

# At Username Text
# Apr 17th 2019, 17:12 cpierce no
# Apr 17th 2019, 17:12 dereuromark are you testing a plugin?
# Apr 17th 2019, 17:11 cpierce anyone help me out on the cause of this issue? ... obviously it's referencing it in the vendor file so i'd assume i'm missing something that should be installed
# Apr 17th 2019, 17:10 cpierce ```./bin/cake PHP Fatal error: Uncaught Error: Class 'Cake\Routing\Router' not found in /var/www/cpierce-testing/vendor/cakephp/cakephp/config/bootstrap.php:22 Stack trace: #0 /var/www/cpierce-testing/config/bootstrap.php(30): require() #1 /var/www/cpierce-testing/bin/cake.php(31): include('/var/www/cpierc...') #2 {main} thrown in /var/www/cpierce-testing/vendor/cakephp/cakephp/config/bootstrap.php on line 22```
# Apr 17th 2019, 16:27 ksc To explain what i try to do: I try to increment an order number based on one client. -> pair of "client_id" and "order_nbr" should be unique. I call a generateOrderNbr function in the beforeSave() function of my orders table. I tried the buildrules, but this doesn't work: $rules->add($rules->isUnique(['client_id', 'order_nbr'], _('Order No. has to be unique.')));
# Apr 17th 2019, 16:17 ksc Hi, is real uniqueness for 2 combined columns with CakePHP 3 possible if it's not configured in mysql as UNIQUE INDEX ?
# Apr 17th 2019, 16:04 facuvillard Okey okey! Thanks!
# Apr 17th 2019, 15:58 steinkel @facuvillard there is a specific channel for spanish support
# Apr 17th 2019, 15:56 neon1024 Also I believe that @steinkel is a Spanish speaker, so might be able to advise further :slightly_smiling_face:
# Apr 17th 2019, 15:56 neon1024 Or Sphinx I forget what it’s written in now :slightly_smiling_face:
# Apr 17th 2019, 15:56 neon1024 You can download the docker container if you’d want, but Github does a pretty good job with Latex
# Apr 17th 2019, 15:55 neon1024 The pages pretty much match the urls
# Apr 17th 2019, 15:55 waspinator https://book.cakephp.org/3.0/es/index.html
# Apr 17th 2019, 15:55 neon1024 So you can contribute translations to here https://github.com/cakephp/docs/tree/3.0/es
# Apr 17th 2019, 15:55 neon1024 The existing docs are here, https://book.cakephp.org/3.0/es/index.html
# Apr 17th 2019, 15:54 neon1024 The repo is here https://github.com/cakephp/docs
# Apr 17th 2019, 15:53 facuvillard i want help cakephp with documentation in Spanish language, but i dont know how :(
# Apr 17th 2019, 15:52 facuvillard Hi, i need help
# Apr 17th 2019, 15:11 Coddyx It is :)
# Apr 17th 2019, 15:11 neon1024 Hope it’s helpful! :thumbsup:
# Apr 17th 2019, 15:11 Coddyx Thank you for your time and explanations
# Apr 17th 2019, 15:07 neon1024 This is where SOLID comes in, and the Composition over Inheritance principle, which leads into the Dependancy Injection rabbit hole!
# Apr 17th 2019, 15:07 neon1024 When creating a mock for a class, you can only mock the return of a method in that class
# Apr 17th 2019, 15:06 neon1024 Yes
# Apr 17th 2019, 15:03 Coddyx Is this because I can't mock a return value of a function not directly called by the test?
# Apr 17th 2019, 15:03 Coddyx But whatever I put in $this->returnValue the test always failed
# Apr 17th 2019, 15:02 Coddyx $alertes = $this->getMockForModel('Alertes', ['get']); $alertes ->expects($this->once()) ->method('get') ->will($this->returnValue(false)); $this->get('/en'); $this->assertResponseCode(503);
# Apr 17th 2019, 15:02 Coddyx ie
# Apr 17th 2019, 15:02 Coddyx I also tried mocking the return value of the get method on the model
# Apr 17th 2019, 15:02 Coddyx WHILE we're there
# Apr 17th 2019, 15:02 Coddyx and
# Apr 17th 2019, 15:02 Coddyx ok
# Apr 17th 2019, 15:01 neon1024 It’d probably be the least amount of work
# Apr 17th 2019, 15:00 Coddyx To switch the value for true and false
# Apr 17th 2019, 15:00 Coddyx You suggest I hit the db before the true and false test for miantenance mode?
# Apr 17th 2019, 15:00 Coddyx So for my specific test case
# Apr 17th 2019, 15:00 Coddyx I understand
# Apr 17th 2019, 14:59 Coddyx :)
# Apr 17th 2019, 14:59 neon1024 https://www.reddit.com/r/Jokes/comments/a4a4jc/a_software_qa_engineer_walks_into_a_bar/
# Apr 17th 2019, 14:58 neon1024 Read about the man who walks into a bar and buys a beer ;)
# Apr 17th 2019, 14:58 neon1024 There is a balance between critical path testing and testing every use-case