Laravel developers tips

Helpful solutions for Laravel framework developers

PhpUnit

Unit tests – complex argument matching with Mockery::on – the right way

December 1, 2018 by Marcin Nabiałek / Leave a Comment

As you probably know, writing tests is very important part of developing applications. If you don’t have them you don’t have this confidence when making changes and each time you make complex change you might break a lot of parts of application without knowing this. In my opinion in most cases feature/integration tests are the … [Read more…]

Posted in: Mockery, PHP, PhpUnit, Testing Tagged: tests argument matching, using mockery

Partial mocking and issues you don’t expect

June 30, 2016 by Marcin Nabiałek / 2 Comments

As we all know, writing tests is very useful when developing applications. But sometimes you might find issues when writing tests that are really hard to detect. If you ever got “Serialization of ‘Closure’ is not allowed” / “unserialize(): Error at offset 0 of 186 bytes in” errors when running PhpUnit together with Mockery – … [Read more…]

Posted in: Laravel, Mockery, PHP, PhpUnit, Testing Tagged: exceptions, issues, mocks

Marcin Nabiałek

Marcin Nabiałek - Certified Laravel Developer
Marcin Nabiałek - Zend Certified PHP Engineer

Categories

  • Composer
  • Eloquent
  • Laravel
  • Laravel Blade
  • Laravel Dusk
  • Laravel packages
  • Mockery
  • PHP
  • PhpUnit
  • Request
  • Testing
  • Validation

Copyright © 2023 Marcin Nabiałek