Skip to content

Update testing 84 #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
strategy:
fail-fast: false
matrix:
laravel: [ ^10.0, ^11.0 ]
php: ['8.2', '8.3']
laravel: [^11.0, ^12.0]
php: [8.3, 8.4]
include:
- laravel: ^10.0
testbench: ^8.0
- laravel: ^11.0
testbench: ^9.0
- laravel: ^12.0
testbench: ^10.0
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ coverage.xml
_ide_helper.php
_ide_helper_models.php.php
.phpunit.result.cache
.phpunit.cache
.phpunit.cache/*
1 change: 0 additions & 1 deletion .phpunit.cache/test-results

This file was deleted.

3 changes: 0 additions & 3 deletions buildDockerImages.sh

This file was deleted.

14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
}
],
"require": {
"php": "^8.1",
"illuminate/support": "^10.0|^11.0"
"php": ">=8.1",
"illuminate/support": ">=10.0"
},
"require-dev": {
"ext-mongodb": "*",
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0",
"mockery/mockery": "^1.5",
"nunomaduro/collision": "^7.0|^8.0",
"mongodb/laravel-mongodb": "^4"
"phpunit/phpunit": ">=10.0",
"orchestra/testbench": ">=8.0",
"mockery/mockery": ">=1.5",
"nunomaduro/collision": ">=7.0",
"mongodb/laravel-mongodb": ">=4"
},
"suggest": {
"jenssegers/mongodb": "Adds support for MongoDB in Laravel/Eloquent"
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
version: "3.0"
services:

logto-mariadb:
image: mariadb:latest
container_name: logto-mariadb
Expand All @@ -20,7 +18,7 @@ services:

php8:
build:
dockerfile: ./docker/php8/Dockerfile
context: docker/php8
container_name: laravel-log-to-db-php8
tty: true
networks:
Expand Down
7 changes: 1 addition & 6 deletions docker/php8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt update && apt install -y lsb-release gnupg2 ca-certificates apt-transpor
RUN apt update && add-apt-repository ppa:ondrej/php
RUN apt update && apt upgrade -y
RUN apt install -y curl git openssl openssh-client mysql-client bash libzip-dev zip wget
RUN apt install -y php8.2 php8.2-dev php8.2-mysql php8.2-mongodb php8.2-curl php8.2-mbstring php8.2-pcov php8.2-cli
RUN apt install -y php8.3 php8.3-dev php8.3-mysql php8.3-mongodb php8.3-curl php8.3-mbstring php8.3-pcov php8.3-cli

RUN pecl install pcov
RUN pecl install mongodb
Expand All @@ -30,8 +30,3 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local

ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
RUN chmod +x /wait

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
5 changes: 0 additions & 5 deletions docker/php8/entrypoint.sh

This file was deleted.

5 changes: 4 additions & 1 deletion tests/LogToDbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,11 @@ public function testModelInteraction()
public function testStandAloneModels()
{
Log::info("This is a info log message...");

$modelMongo = LogToDB::model(null, 'mongodb');

$this->assertNotEmpty(LogSql::get()->toArray());
$this->assertNotEmpty(LogMongo::get()->toArray());
$this->assertNotEmpty($modelMongo->get()->toArray());
}

/**
Expand Down