Skip to content

Commit

Permalink
Added Logger component.
Browse files Browse the repository at this point in the history
  • Loading branch information
SidRoberts committed Sep 14, 2023
1 parent 190cfa1 commit dc44b5e
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/components/logger/interfaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: default
title: Interfaces
parent: Logger
grand_parent: Components
permalink: logger/interfaces
nav_order: 102
---



# Interfaces

(all in the `Centum\Interfaces\Logger` namespace)



## [`Centum\Interfaces\Logger\LoggerInterface`](https://github.com/SidRoberts/centum/blob/development/src/Interfaces/Logger/LoggerInterface.php)

```php
log(
string $message
): void
```
1 change: 1 addition & 0 deletions docs/testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ To futher enhance testing, these traits are available:
- [`Centum\Codeception\Actions\HtmlActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/HtmlActions.php)
- [`Centum\Codeception\Actions\HttpFormActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/HttpFormActions.php)
- [`Centum\Codeception\Actions\JsonActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/JsonActions.php)
- [`Centum\Codeception\Actions\LoggerActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/LoggerActions.php)
- [`Centum\Codeception\Actions\QueueActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/QueueActions.php)
- [`Centum\Codeception\Actions\RouterActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/RouterActions.php)
- [`Centum\Codeception\Actions\RouterReplacementActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/RouterReplacementActions.php)
Expand Down
12 changes: 12 additions & 0 deletions docs/testing/logger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: default
title: Logger Actions
parent: Testing
permalink: testing/logger
---



# Logger Actions

[`Centum\Codeception\Actions\LoggerActions`](https://github.com/SidRoberts/centum/blob/development/src/Codeception/Actions/LoggerActions.php)
8 changes: 8 additions & 0 deletions src/Codeception/Actions/LoggerActions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Centum\Codeception\Actions;

trait LoggerActions
{
//TODO
}
8 changes: 8 additions & 0 deletions src/Interfaces/Logger/LoggerInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Centum\Interfaces\Logger;

interface LoggerInterface
{
public function log(string $message): void;
}
13 changes: 13 additions & 0 deletions src/Logger/Logger.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Centum\Logger;

use Centum\Interfaces\Logger\LoggerInterface;

class Logger implements LoggerInterface
{
public function log(string $message): void
{
//TODO
}
}
16 changes: 16 additions & 0 deletions tests/Codeception/LoggerActionsCest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Tests\Codeception;

use Tests\Support\CodeceptionTester;

/**
* @covers \Centum\Codeception\Actions\LoggerActions
*/
class LoggerActionsCest
{
public function testGrabCookies(CodeceptionTester $I): void
{
$I->markTestIncomplete();
}
}
2 changes: 2 additions & 0 deletions tests/Support/CodeceptionTester.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Centum\Codeception\Actions\HtmlActions;
use Centum\Codeception\Actions\HttpFormActions;
use Centum\Codeception\Actions\JsonActions;
use Centum\Codeception\Actions\LoggerActions;
use Centum\Codeception\Actions\QueueActions;
use Centum\Codeception\Actions\RouterActions;
use Centum\Codeception\Actions\RouterReplacementActions;
Expand Down Expand Up @@ -41,6 +42,7 @@ class CodeceptionTester extends Actor
use HtmlActions;
use HttpFormActions;
use JsonActions;
use LoggerActions;
use QueueActions;
use RouterReplacementActions;
use RouterActions;
Expand Down
16 changes: 16 additions & 0 deletions tests/Unit/Logger/LoggerCest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Tests\Unit\Logger;

use Tests\Support\UnitTester;

/**
* @covers \Centum\Logger\Logger
*/
class LoggerCest
{
public function test(UnitTester $I): void
{
$I->markTestIncomple();
}
}

0 comments on commit dc44b5e

Please sign in to comment.