Avatar 💻

recca0120 Tech Notes

Software Developer / Tech Notes

  1. Home
  2. Archives
  3. Categories
  4. Tags
  5. Search
  6. About
    1. Dark Mode

Archives

2026 3
2024 3
2023 11
2022 13
2020 15
More

Categories

Laravel PHP Testing Database DevOps Frontend MacOS Windows

Tags

Laravel PHP Testing PHPUnit Blade Guzzle Mockery SQLite Composer Docker Linux Migration MySQL Redis Validation Alpine.js AWS Eloquent JavaScript MacOS
Featured image of post Fix Laravel Migration Unknown Database Type Enum Error
Laravel Database

Fix Laravel Migration Unknown Database Type Enum Error

Doctrine DBAL does not recognize MySQL enum type, causing migration failures. Covers Type::addType and registerDoctrineTypeMapping with when to use each fix.

2022 年 12 月 13 日
正體中文
Laravel Migration MySQL
Featured image of post PHPUnit for VSCode 3.0: VS Code Testing API and Docker
Testing PHP

PHPUnit for VSCode 3.0: VS Code Testing API and Docker

A complete rewrite of PHPUnit for VSCode using the VS Code Testing API for real-time sidebar results, now with Docker and SSH remote execution support.

2022 年 12 月 6 日
正體中文
PHPUnit PHP VS Code Docker Testing
Featured image of post Laravel Queue Job Reads Stale Data in Transaction: Fix
Laravel

Laravel Queue Job Reads Stale Data in Transaction: Fix

Jobs dispatched in a transaction re-query the DB via SerializesModels before commit, reading stale data. Use afterCommit() to delay dispatch until after commit.

2022 年 12 月 2 日
正體中文
Laravel Queue Redis
Featured image of post Laravel Testing: Assert View Data Without Parsing HTML
Laravel Testing

Laravel Testing: Assert View Data Without Parsing HTML

HTML assertions on complex views are brittle. Use viewData() to assert view variables directly, and compare Models by id or toArray() to avoid identity issues.

2022 年 11 月 29 日
正體中文
Laravel Testing Blade
Featured image of post PHPUnit: Test Closures with Mockery::spy
Testing PHP

PHPUnit: Test Closures with Mockery::spy

Assertions inside a closure pass silently even if never called. Wrap the closure in Mockery::spy to verify invocation count and arguments in PHPUnit tests.

2022 年 11 月 26 日
正體中文
PHPUnit Mockery PHP Testing
Featured image of post Mock IteratorAggregate with Mockery to Fix foreach in Tests
Testing PHP

Mock IteratorAggregate with Mockery to Fix foreach in Tests

Mocking IteratorAggregate breaks foreach in PHPUnit. Return an ArrayObject from the mocked getIterator method to make foreach iterate over test data correctly.

2022 年 11 月 25 日
正體中文
Mockery PHPUnit PHP Testing
Featured image of post Why Laravel min/max Fails on Numbers: Add the numeric Rule
Laravel

Why Laravel min/max Fails on Numbers: Add the numeric Rule

Laravel min/max rules compare string length by default, letting 0 pass validation. Add the numeric rule to switch to value comparison and fix the bug.

2022 年 11 月 23 日
正體中文
Laravel Validation PHP
Featured image of post Write Deterministic PHPUnit Assertions with Mockery::capture
Testing PHP

Write Deterministic PHPUnit Assertions with Mockery::capture

When a method uses random_int internally, Mockery::capture with passthru captures the intermediate value so you can compute the expected result and assert it.

2022 年 11 月 22 日
正體中文
PHP Mockery PHPUnit Testing
Featured image of post Get a Free VMware Fusion Player Personal License
MacOS

Get a Free VMware Fusion Player Personal License

VMware Fusion Player is free for personal use. Create a VMware account to get a License Key and download link, with tips for bypassing form validation issues.

2022 年 11 月 21 日
正體中文
VMware
Featured image of post Fix the Missing mysql Command After Installing DBngin
Database MacOS

Fix the Missing mysql Command After Installing DBngin

DBngin supports multiple MySQL versions but never adds them to PATH. Add one line to .bashrc pointing to the latest version to get the mysql command working.

2022 年 11 月 8 日
正體中文
MySQL MacOS
1 2 3 4 5
© 2020 - 2026 recca0120 Tech Notes
recca0120 on GitHub
Built with Hugo
Theme Stack designed by Jimmy