@@ -10,7 +10,6 @@ Comprehensive testing suite for PDF Content Search application using PHPUnit.
1010
1111# Run specific test suites
1212./vendor/bin/phpunit --testsuite=Unit
13- ./vendor/bin/phpunit --testsuite=Integration
1413./vendor/bin/phpunit --testsuite=Functional
1514
1615# Run with coverage
4948│ ├── Search/ # Query parsing and building logic
5049│ ├── Service/ # Service layer tests
5150│ └── Shared/ # Shared traits and utilities
52- ├── Integration/ # Tests with real dependencies (Elasticsearch, DB)
53- │ ├── Command/ # Console command tests
54- │ └── Service/ # Service integration tests
5551├── Functional/ # HTTP endpoint tests
5652│ └── Controller/ # Controller action tests
5753└── Fixtures/ # Test data factories and helpers
@@ -136,7 +132,7 @@ final class QueryParserTest extends TestCase
136132
137133- ** Environment** : ` APP_ENV=test ` (` .env.test ` )
138134- ** Database** : SQLite in-memory (future use)
139- - ** Elasticsearch** : Mock for unit tests, Docker for integration tests
135+ - ** Elasticsearch** : Mocked in all tests
140136
141137### Environment Variables
142138
@@ -153,34 +149,8 @@ ELASTICSEARCH_INDEX_PDFS=pdf_pages_test
153149Tests run automatically on:
154150- Every push to any branch
155151- Every pull request
156- - Daily scheduled runs (main branch)
157152
158- See ` .github/workflows/tests.yml ` for CI configuration.
159-
160- ## Integration Tests with Elasticsearch
161-
162- Integration tests requiring Elasticsearch are marked with ` @group elasticsearch ` :
163-
164- ``` bash
165- # Skip Elasticsearch tests
166- ./vendor/bin/phpunit --exclude-group elasticsearch
167-
168- # Run only Elasticsearch tests
169- ./vendor/bin/phpunit --group elasticsearch
170- ```
171-
172- ** Docker Setup for Integration Tests** :
173-
174- ``` bash
175- # Start test Elasticsearch instance
176- docker-compose -f docker-compose.test.yml up -d elasticsearch-test
177-
178- # Run integration tests
179- ./vendor/bin/phpunit --testsuite=Integration
180-
181- # Stop test services
182- docker-compose -f docker-compose.test.yml down
183- ```
153+ See ` .github/workflows/ci.yml ` for CI configuration.
184154
185155## Code Coverage
186156
@@ -243,11 +213,7 @@ final class ServiceTest extends TestCase
243213
244214### Issue: Elasticsearch Connection Errors
245215
246- ** Solution** : Use mocks for unit tests, skip integration tests without Docker
247-
248- ``` bash
249- ./vendor/bin/phpunit --exclude-group elasticsearch
250- ```
216+ ** Solution** : All tests use mocks, no real Elasticsearch connection needed
251217
252218### Issue: Functional Tests Fail (Missing Assets)
253219
@@ -259,7 +225,7 @@ npm run build # or: yarn build
259225
260226### Issue: PDF Processing Tests
261227
262- ** Solution** : ` pdftotext ` not required for unit tests (mocked). Install ` poppler-utils ` for integration tests.
228+ ** Solution** : ` pdftotext ` not required for unit tests (mocked).
263229
264230## Factories and Fixtures
265231
@@ -281,9 +247,8 @@ $response = SearchResultFactory::create()
281247## Performance
282248
283249- ** Unit tests** : < 1 second
284- - ** Integration tests** : < 10 seconds
285250- ** Functional tests** : < 5 seconds
286- - ** Full suite** : < 15 seconds
251+ - ** Full suite** : < 5 seconds
287252
288253Slow tests indicate architectural issues requiring refactoring.
289254
0 commit comments